Skip to content

Commit 26a8d9c

Browse files
committed
minor #21249 [Validator] Add min and max in both error messages of LengthValidator (VincentLanglet)
This PR was squashed before being merged into the 7.4 branch. Discussion ---------- [Validator] Add min and max in both error messages of `LengthValidator` Closes #21248 Commits ------- d86745d [Validator] Add min and max in both error messages of `LengthValidator`
2 parents bb070ed + d86745d commit 26a8d9c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

reference/constraints/Length.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,16 @@ You can use the following parameters in this message:
201201
Parameter Description
202202
====================== ============================================================
203203
``{{ limit }}`` The expected maximum length
204+
``{{ min }}`` The expected minimum length
205+
``{{ max }}`` The expected maximum length
204206
``{{ value }}`` The current (invalid) value
205207
``{{ value_length }}`` The current value's length
206208
====================== ============================================================
207209

210+
.. versionadded:: 7.4
211+
212+
The `{{ min }}` and `{{ max }}` parameters were introduced in Symfony 7.4.
213+
208214
``min``
209215
~~~~~~~
210216

@@ -233,10 +239,16 @@ You can use the following parameters in this message:
233239
Parameter Description
234240
====================== ============================================================
235241
``{{ limit }}`` The expected minimum length
242+
``{{ min }}`` The expected minimum length
243+
``{{ max }}`` The expected maximum length
236244
``{{ value }}`` The current (invalid) value
237245
``{{ value_length }}`` The current value's length
238246
====================== ============================================================
239247

248+
.. versionadded:: 7.4
249+
250+
The `{{ min }}` and `{{ max }}` parameters were introduced in Symfony 7.4.
251+
240252
.. include:: /reference/constraints/_normalizer-option.rst.inc
241253

242254
.. include:: /reference/constraints/_payload-option.rst.inc

0 commit comments

Comments
 (0)