File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,12 @@ expression that must return true in order for validation to pass. To learn
143143more about the expression language syntax, see
144144:doc: `/components/expression_language/syntax `.
145145
146+ .. versionadded :: 6.2
147+ The `negate ` option was introduced in Symfony 6.2.
148+
149+ Alternatively, you can set the `negate `_ option to ``false `` in order to
150+ assert that the expression must return ``true `` for validation to fail.
151+
146152.. sidebar :: Mapping the Error to a Specific Field
147153
148154 You can also attach the constraint to a specific property and still validate
@@ -294,6 +300,16 @@ Parameter Description
294300``{{ label }} `` Corresponding form field label
295301=============== ==============================================================
296302
303+ ``negate ``
304+ ~~~~~~~~~~~
305+
306+ **type **: ``boolean `` **default **: ``true ``
307+
308+ If ``false ``, the validation fails when expression returns ``true ``.
309+
310+ .. versionadded :: 6.2
311+ The `negate ` option was introduced in Symfony 6.2.
312+
297313.. include :: /reference/constraints/_payload-option.rst.inc
298314
299315``values ``
You can’t perform that action at this time.
0 commit comments