Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61f74f8

Browse files
committed
Merge branch '2.0'
Conflicts:reference/constraints/UniqueEntity.rst
2 parents9250080 +0434394 commit61f74f8

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 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+
usingan 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,21 +85,21 @@ 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 displayedwith this constraint fails.
95+
The message that's displayedwhen 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 correct entity manager will determined for
103+
uniqueness. Ifit'sleft blank, the correct entity manager will determined for
103104
this class. For that reason, this option should probably not need to be
104105
used.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp