@@ -160,9 +160,9 @@ errorPath
160
160
.. versionadded :: 2.1
161
161
The ``errorPath `` option was added in Symfony 2.1.
162
162
163
- If the entity violates against this constraint the error message is bound to
164
- the first field . If there are more than one fields it may be desired to bind 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 may want to map
165
+ the error message to another field.
166
166
167
167
Consider this example:
168
168
@@ -174,7 +174,7 @@ Consider this example:
174
174
Acme\AdministrationBundle\Entity\Service :
175
175
constraints :
176
176
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity :
177
- fields : [ host, port ]
177
+ fields : [host, port]
178
178
errorPath : port
179
179
message : ' This port is already in use on that host.'
180
180
@@ -251,7 +251,7 @@ Consider this example:
251
251
}
252
252
}
253
253
254
- Now, the message would be bound to the form field of the ``port `` with this configuration.
254
+ Now, the message would be bound to the ``port `` field with this configuration.
255
255
256
256
257
257
ignoreNull
@@ -266,6 +266,3 @@ If this option is set to ``true``, then the constraint will allow multiple
266
266
entities to have a ``null `` value for a field without failing validation.
267
267
If set to ``false ``, only one ``null `` value is allowed - if a second entity
268
268
also has a ``null `` value, validation would fail.
269
-
270
-
271
- .. _`field` : `fields `_
0 commit comments