File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,18 @@ message
132
132
133
133
**type **: ``string `` **default **: ``This value is already used. ``
134
134
135
- The message that's displayed when this constraint fails.
135
+ The message that's displayed when this constraint fails. This message is always
136
+ mapped to the first field causing the violation, even when using multiple fields
137
+ in the constraint.
138
+
139
+ .. versionadded :: 3.1
140
+ The ability to include the invalid value into the message was introduced
141
+ in Symfony 3.1.
142
+
143
+ Messages can include the ``{{ value }} `` placeholder to display a string
144
+ representation of the invalid entity. If the entity doesn't define the
145
+ ``__toString() `` method, the following generic value will be used: *"Object of
146
+ class __CLASS__ identified by <comma separated IDs>" *
136
147
137
148
em
138
149
~~
You can’t perform that action at this time.
0 commit comments