File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ 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
+ Alternatively, you can set the `negate `_ option to ``false `` in order to
149
+ assert that the expression must return true for validation to fail.
150
+
146
151
.. sidebar :: Mapping the Error to a Specific Field
147
152
148
153
You can also attach the constraint to a specific property and still validate
@@ -294,6 +299,13 @@ Parameter Description
294
299
``{{ label }} `` Corresponding form field label
295
300
=============== ==============================================================
296
301
302
+ ``negate ``
303
+ ~~~~~~~~~~~
304
+
305
+ **type **: ``boolean `` **default **: ``true ``
306
+
307
+ If ``false ``, the validation fails when expression returns ``true ``.
308
+
297
309
.. include :: /reference/constraints/_payload-option.rst.inc
298
310
299
311
``values ``
You can’t perform that action at this time.
0 commit comments