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
6
6
========== ===================================================================
7
7
Applies to :ref: `property or method <validation-property-target >`
8
8
Options - `groups `_
9
+ - `invalidDateTimeMessage `_
9
10
- `invalidMessage `_
10
11
- `max `_
11
12
- `maxMessage `_
@@ -316,13 +317,33 @@ Options
316
317
317
318
.. include :: /reference/constraints/_groups-option.rst.inc
318
319
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
+
319
340
invalidMessage
320
341
~~~~~~~~~~~~~~
321
342
322
343
**type **: ``string `` **default **: ``This value should be a valid number. ``
323
344
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 .
326
347
327
348
You can use the following parameters in this message:
328
349
You can’t perform that action at this time.
0 commit comments