Skip to content

[Validator] BicValidator add strict mode to validate bics in strict mode #19938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions reference/constraints/Bic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,24 @@ Parameter Description

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

``mode``
~~~~~~~~

**type**: ``string`` **default**: ``strict``

The mode in which the BIC is validated can be defined with this option. Valid values are:

* ``strict`` uses the input BIC and validates it without modification.
* ``case-insensitive`` converts the input value to uppercase before validating the BIC.

.. tip::

The possible values of this option are also defined as PHP constants of
:class:`Symfony\\Component\\Validator\\Constraints\\BIC`
(e.g. ``BIC::VALIDATION_MODE_CASE_INSENSITIVE``).

.. versionadded:: 7.2

The ``mode`` option was introduced in Symfony 7.2.

.. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code
Loading