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

Commit6f8439b

Browse files
committed
[symfony#2797] Minor tweaks to new UniqueEntity.errorPath docs
1 parent802a8c7 commit6f8439b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

‎reference/constraints/UniqueEntity.rst‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ errorPath
160160
..versionadded::2.1
161161
The ``errorPath`` option was added in Symfony 2.1.
162162

163-
If the entity violatesagainst thisconstraint the error message is bound to
164-
the first field. If there are more than one fields it maybe desiredtobind the
165-
error message to another field.
163+
If the entity violates constraint the error message is bound to the first
164+
field in `fields`_. If there are more than one fields, you maywanttomap
165+
theerror message to another field.
166166

167167
Consider this example:
168168

@@ -174,7 +174,7 @@ Consider this example:
174174
Acme\AdministrationBundle\Entity\Service:
175175
constraints:
176176
-Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity:
177-
fields:[host, port]
177+
fields:[host, port]
178178
errorPath:port
179179
message:'This port is already in use on that host.'
180180
@@ -251,7 +251,7 @@ Consider this example:
251251
}
252252
}
253253
254-
Now, the message would be bound to theform field of the``port`` with this configuration.
254+
Now, the message would be bound to the ``port`` field with this configuration.
255255

256256

257257
ignoreNull
@@ -266,6 +266,3 @@ If this option is set to ``true``, then the constraint will allow multiple
266266
entities to have a ``null`` value for a field without failing validation.
267267
If set to ``false``, only one ``null`` value is allowed - if a second entity
268268
also has a ``null`` value, validation would fail.
269-
270-
271-
.. _`field`: `fields`_

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp