Skip to content

Commit 4abf45f

Browse files
committed
caution on null values in Expression constraint
This adds a warning to the reference of the Expression constraint explaining that `null` values won't be validated in Symfony 2.4 and Symfony 2.5.
1 parent e579876 commit 4abf45f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

reference/constraints/Expression.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ One way to accomplish this is with the Expression constraint:
128128
// ...
129129
}
130130
131+
.. caution::
132+
133+
In Symfony 2.4 and Symfony 2.5, ``null`` values won't be validated by
134+
the Expression constraint. Therefore, to disallow ``null`` values, you
135+
would also have to use the :doc:`NotNull constraint </reference/constraints/NotNull>`.
136+
131137
The :ref:`expression <reference-constraint-expression-option>` option is the
132138
expression that must return true in order for validation to pass. To learn
133139
more about the expression language syntax, see

0 commit comments

Comments
 (0)