File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,13 @@ expression that must return true in order for validation to pass. To learn
143
143
more about the expression language syntax, see
144
144
:doc: `/components/expression_language/syntax `.
145
145
146
+ .. versionadded :: 6.2
147
+
148
+ The `negate ` option was introduced in Symfony 6.2.
149
+
150
+ Alternatively, you can set the `negate ` option to ``false `` in order to
151
+ assert that the expression must return ``true `` for validation to fail.
152
+
146
153
.. sidebar :: Mapping the Error to a Specific Field
147
154
148
155
You can also attach the constraint to a specific property and still validate
@@ -294,6 +301,17 @@ Parameter Description
294
301
``{{ label }} `` Corresponding form field label
295
302
=============== ==============================================================
296
303
304
+ ``negate ``
305
+ ~~~~~~~~~~~
306
+
307
+ **type **: ``boolean `` **default **: ``true ``
308
+
309
+ If ``false ``, the validation fails when expression returns ``true ``.
310
+
311
+ .. versionadded :: 6.2
312
+
313
+ The `negate ` option was introduced in Symfony 6.2.
314
+
297
315
.. include :: /reference/constraints/_payload-option.rst.inc
298
316
299
317
``values ``
You can’t perform that action at this time.
0 commit comments