Files
archived-symfony-docs/reference/constraints/_normalizer-option.rst.inc
2026-01-08 16:36:18 +01:00

14 lines
414 B
PHP

``normalizer``
~~~~~~~~~~~~~~
**type**: a `PHP callable`_ **default**: ``null``
This option allows you to define the PHP callable applied to the given value before
checking if it is valid.
For example, you may want to pass the ``'trim'`` string to apply the
:phpfunction:`trim` PHP function in order to ignore leading and trailing
whitespace during validation.
.. _`PHP callable`: https://www.php.net/callable