Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0434394

Browse files
committed
Merge pull request symfony#1213 from hhamon/unique_entity_fix
[reference] [constraints] fixed various typos in UniqueEntity constraint...
2 parents 961230e + 0bb9607 commit 0434394

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

reference/constraints/UniqueEntity.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
UniqueEntity
22
============
33

4-
Validates that a particular field (or fields) in a Doctrine entity are 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 entity is (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.
2020
Basic 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,19 +85,19 @@ fields
8485

8586
This required option is the field (or list of fields) on which this entity
8687
should 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

8990
message
9091
~~~~~~~
9192

9293
**type**: ``string`` **default**: ``This value is already used.``
9394

94-
The message that's displayed with this constraint fails.
95+
The message that's displayed when this constraint fails.
9596

9697
em
9798
~~
9899

99100
**type**: ``string``
100101

101102
The name of the entity manager to use for making the query to determine the
102-
uniqueness. If left blank, the default entity manager will be used.
103+
uniqueness. If it's left blank, the default entity manager will be used.

0 commit comments

Comments
 (0)