Skip to content

Commit 44aaa9e

Browse files
committed
Document allowLowerCase allowSpaces options
1 parent 65a573c commit 44aaa9e

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

reference/constraints/Bic.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ check that the BIC is associated with a given IBAN.
1414
| | - `iban`_ |
1515
| | - `ibanMessage`_ |
1616
| | - `ibanPropertyPath`_ |
17+
| | - `allowLowerCase`_ |
18+
| | - `allowSpaces`_ |
1719
+----------------+-----------------------------------------------------------------------+
1820
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Bic` |
1921
+----------------+-----------------------------------------------------------------------+
@@ -131,4 +133,20 @@ For example, if you want to compare the ``$bic`` property of some object
131133
with regard to the ``$iban`` property of the same object, use
132134
``propertyPath="iban"`` in the comparison constraint of ``$bic``.
133135

136+
allowLowerCase
137+
~~~~~~~~~~~~~~~~
138+
139+
**type**: ``boolean`` **default**: false
140+
141+
If this option is set to ``false`` and value contains a lower letter, a validation
142+
error will be returned.
143+
144+
allowSpaces
145+
~~~~~~~~~~~~~~~~
146+
147+
**type**: ``boolean`` **default**: true
148+
149+
If this option is set to ``false`` and value contains a space, a validation
150+
error will be returned.
151+
134152
.. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code

reference/constraints/Iban.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ borders with a reduced risk of propagating transcription errors.
1111
+----------------+-----------------------------------------------------------------------+
1212
| Options | - `message`_ |
1313
| | - `payload`_ |
14+
| | - `allowLowerCase`_ |
15+
| | - `allowSpaces`_ |
1416
+----------------+-----------------------------------------------------------------------+
1517
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Iban` |
1618
+----------------+-----------------------------------------------------------------------+
@@ -110,6 +112,22 @@ You can use the following parameters in this message:
110112
| ``{{ value }}`` | The current (invalid) value |
111113
+-----------------+-----------------------------+
112114

115+
allowLowerCase
116+
~~~~~~~~~~~~~~~~
117+
118+
**type**: ``boolean`` **default**: true
119+
120+
If this option is set to ``false`` and value contains a lower letter, a validation
121+
error will be returned.
122+
123+
allowSpaces
124+
~~~~~~~~~~~~~~~~
125+
126+
**type**: ``boolean`` **default**: true
127+
128+
If this option is set to ``false`` and value contains a space, a validation
129+
error will be returned.
130+
113131
.. include:: /reference/constraints/_payload-option.rst.inc
114132

115133
.. _`International Bank Account Number (IBAN)`: https://en.wikipedia.org/wiki/International_Bank_Account_Number

0 commit comments

Comments
 (0)