Skip to content

Commit

Permalink
minor #20520 [Validator] [DateTime] Add format to error messages …
Browse files Browse the repository at this point in the history
…(mdoutreluingne)

This PR was squashed before being merged into the 7.3 branch.

Discussion
----------

[Validator] [DateTime] Add ``format`` to error messages

Fixes #20518

Commits
-------

17a46ad [Validator] [DateTime] Add ``format`` to error messages
  • Loading branch information
javiereguiluz committed Jan 7, 2025
2 parents 080b71f + 17a46ad commit 765112c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions reference/constraints/DateTime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,16 @@ This message is shown if the underlying data is not a valid datetime.

You can use the following parameters in this message:

=============== ==============================================================
Parameter Description
=============== ==============================================================
``{{ value }}`` The current (invalid) value
``{{ label }}`` Corresponding form field label
=============== ==============================================================
================ ==============================================================
Parameter Description
================ ==============================================================
``{{ value }}`` The current (invalid) value
``{{ label }}`` Corresponding form field label
``{{ format }}`` The date format defined in ``format``
================ ==============================================================

.. versionadded:: 7.3

The ``{{ format }}`` parameter was introduced in Symfony 7.3.

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

0 comments on commit 765112c

Please sign in to comment.