File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Validates that a given number or ``DateTime`` object is *between* some minimum a
66========== ===================================================================
77Applies to :ref: `property or method <validation-property-target >`
88Options - `groups `_
9+ - `invalidDateTimeMessage `_
910 - `invalidMessage `_
1011 - `max `_
1112 - `maxMessage `_
@@ -316,13 +317,33 @@ Options
316317
317318.. include :: /reference/constraints/_groups-option.rst.inc
318319
320+ invalidDateTimeMessage
321+ ~~~~~~~~~~~~~~~~~~~~~~
322+
323+ **type **: ``string `` **default **: ``This value should be a valid number. ``
324+
325+ .. versionadded :: 5.2
326+
327+ The ``invalidDateTimeMessage `` option was introduced in Symfony 5.2.
328+
329+ The message displayed when the ``min `` and ``max `` values are PHP datetimes but
330+ the given value is not.
331+
332+ You can use the following parameters in this message:
333+
334+ =============== ==============================================================
335+ Parameter Description
336+ =============== ==============================================================
337+ ``{{ value }} `` The current (invalid) value
338+ =============== ==============================================================
339+
319340invalidMessage
320341~~~~~~~~~~~~~~
321342
322343**type **: ``string `` **default **: ``This value should be a valid number. ``
323344
324- The message that will be shown if the underlying value is not a number (per
325- the :phpfunction: `is_numeric ` PHP function).
345+ The message displayed when the `` min `` and `` max `` values are numeric (per
346+ the :phpfunction: `is_numeric ` PHP function) but the given value is not .
326347
327348You can use the following parameters in this message:
328349
You can’t perform that action at this time.
0 commit comments