11UniqueEntity
22============
33
4- Validates that a particular field (or fields) in a Doctrine entityare unique.
5- This is commonly used, for example, to prevent a new user to register using
6- an email address that already exists in the system.
4+ Validates that a particular field (or fields) in a Doctrine entityis (are)
5+ unique. This is commonly used, for example, to prevent a new user to register
6+ using an email address that already exists in the system.
77
88+----------------+-------------------------------------------------------------------------------------+
99| Applies to| :ref: `class<validation-class-target> `|
@@ -20,9 +20,10 @@ an email address that already exists in the system.
2020Basic Usage
2121-----------
2222
23- Suppose you have an ``AcmeUserBundle `` with a ``User `` entity that has an
24- ``email `` field. You can use the ``Unique `` constraint to guarantee that the
25- ``email `` field remains unique between all of the constrains in your user table:
23+ Suppose you have an ``AcmeUserBundle `` bundle with a ``User `` entity that has an
24+ ``email `` field. You can use the ``UniqueEntity `` constraint to guarantee that
25+ the ``email `` field remains unique between all of the constraints in your user
26+ table:
2627
2728..configuration-block ::
2829
@@ -84,21 +85,21 @@ fields
8485
8586This required option is the field (or list of fields) on which this entity
8687should be unique. For example, you could specify that both the email and
87- name fields in the User example above should be unique.
88+ name fields in the`` User `` example above should be unique.
8889
8990message
9091~~~~~~~
9192
9293**type **: ``string `` **default **: ``This value is already used. ``
9394
94- The message that's displayedwith this constraint fails.
95+ The message that's displayedwhen this constraint fails.
9596
9697em
9798~~
9899
99100**type **: ``string ``
100101
101102The name of the entity manager to use for making the query to determine the
102- uniqueness. If left blank, the correct entity manager will determined for
103+ uniqueness. Ifit's left blank, the correct entity manager will determined for
103104this class. For that reason, this option should probably not need to be
104105used.