Skip to content

Commit 0643e1e

Browse files
committed
minor #16754 [Validator] Update Length Validator Empty String Docs (jrjohnson)
This PR was merged into the 6.0 branch. Discussion ---------- [Validator] Update Length Validator Empty String Docs Empty strings are no longer valid if a min is passed, null values still validate. Changed in 6.0 along with dropping the deprecated `allowEmptyString` symfony/symfony#36818 option. There is some discussion that this is the intended behavior in symfony/symfony#45993 Commits ------- 9fa967e Update Length Validator Empty String Docs
2 parents 6c1325c + 9fa967e commit 0643e1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reference/constraints/Length.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ and ``50``, you might add the following:
113113
}
114114
}
115115
116-
.. include:: /reference/constraints/_empty-values-are-valid.rst.inc
116+
.. include:: /reference/constraints/_null-values-are-valid.rst.inc
117117

118118
Options
119119
-------
@@ -199,9 +199,9 @@ the given value's length is **less** than this min value.
199199

200200
This option is required when the ``max`` option is not defined.
201201

202-
It is important to notice that NULL values and empty strings are considered
203-
valid no matter if the constraint required a minimum length. Validators
204-
are triggered only if the value is not blank.
202+
It is important to notice that ``null`` values are considered
203+
valid no matter if the constraint requires a minimum length. Validators
204+
are triggered only if the value is not ``null``.
205205

206206
``minMessage``
207207
~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)