Skip to content

Commit 61641ca

Browse files
authored
[Validator] Document the new notInRangeMessage option
1 parent 4f35e80 commit 61641ca

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

reference/constraints/Range.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Options - `groups`_
1313
- `min`_
1414
- `minMessage`_
1515
- `minPropertyPath`_
16+
- `notInRangeMessage`_
1617
- `payload`_
1718
Class :class:`Symfony\\Component\\Validator\\Constraints\\Range`
1819
Validator :class:`Symfony\\Component\\Validator\\Constraints\\RangeValidator`
@@ -433,3 +434,25 @@ with regard to the ``$startDate`` property of the same object, use
433434

434435
.. _`is_numeric`: https://php.net/manual/en/function.is-numeric.php
435436
.. _`accepted by the DateTime constructor`: https://php.net/manual/en/datetime.formats.php
437+
438+
notInRangeMessage
439+
~~~~~~~~~~~~~~~~~
440+
441+
**type**: ``string`` **default**: ``This value should be between {{ min }} and {{ max }}.``
442+
443+
.. versionadded:: 4.4
444+
445+
The ``notInRangeMessage`` option was introduced in Symfony 4.4.
446+
447+
The message that will be shown if the underlying value is less than the
448+
`min`_ option and more than the `max`_ option.
449+
450+
You can use the following parameters in this message:
451+
452+
=============== ==============================================================
453+
Parameter Description
454+
=============== ==============================================================
455+
``{{ max }}`` The upper limit
456+
``{{ min }}`` The lower limit
457+
``{{ value }}`` The current (invalid) value
458+
=============== ==============================================================

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy