Skip to content

Commit 8b4ebcf

Browse files
committed
minor #19938 [Validator] BicValidator add strict mode to validate bics in strict mode (maxbeckers)
This PR was merged into the 7.2 branch. Discussion ---------- [Validator] BicValidator add strict mode to validate bics in strict mode Add docs for the mode of the bic validator. Related issue #19937. Options are ``strict`` (default behavior) and ``case-insensitive`` (new option to transform the input to upper case before validation) Commits ------- dc23e2e [Validator] BicValidator add strict mode to validate bics in strict mode
2 parents 6c3a7de + dc23e2e commit 8b4ebcf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

reference/constraints/Bic.rst

+20
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,24 @@ Parameter Description
121121

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

124+
``mode``
125+
~~~~~~~~
126+
127+
**type**: ``string`` **default**: ``strict``
128+
129+
The mode in which the BIC is validated can be defined with this option. Valid values are:
130+
131+
* ``strict`` uses the input BIC and validates it without modification.
132+
* ``case-insensitive`` converts the input value to uppercase before validating the BIC.
133+
134+
.. tip::
135+
136+
The possible values of this option are also defined as PHP constants of
137+
:class:`Symfony\\Component\\Validator\\Constraints\\BIC`
138+
(e.g. ``BIC::VALIDATION_MODE_CASE_INSENSITIVE``).
139+
140+
.. versionadded:: 7.2
141+
142+
The ``mode`` option was introduced in Symfony 7.2.
143+
124144
.. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code

0 commit comments

Comments
 (0)