|
3 | 3 |
|
4 | 4 | This constraint is used to ensure that a value has the proper format of a
|
5 | 5 | `Business Identifier Code (BIC)`_. BIC is an internationally agreed means to
|
6 |
| -uniquely identify both financial and non-financial institutions. |
| 6 | +uniquely identify both financial and non-financial institutions. You may also |
| 7 | +check that the BIC is associated with a given IBAN. |
7 | 8 |
|
8 | 9 | +----------------+-----------------------------------------------------------------------+
|
9 | 10 | | Applies to | :ref:`property or method <validation-property-target>` |
|
10 | 11 | +----------------+-----------------------------------------------------------------------+
|
11 | 12 | | Options | - `message`_ |
|
12 | 13 | | | - `payload`_ |
|
| 14 | +| | - `iban`_ | |
| 15 | +| | - `ibanMessage`_ | |
| 16 | +| | - `ibanPropertyPath`_ | |
13 | 17 | +----------------+-----------------------------------------------------------------------+
|
1
8000
4 | 18 | | Class | :class:`Symfony\\Component\\Validator\\Constraints\\Bic` |
|
15 | 19 | +----------------+-----------------------------------------------------------------------+
|
@@ -92,4 +96,29 @@ The default message supplied when the value does not pass the BIC check.
|
92 | 96 |
|
93 | 97 | .. include:: /reference/constraints/_payload-option.rst.inc
|
94 | 98 |
|
| 99 | +ibanMessage |
| 100 | +~~~~~~~~~~~ |
| 101 | + |
| 102 | +**type**: ``string`` **default**: ``This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.`` |
| 103 | + |
| 104 | +The default message supplied when the value does not pass the combined BIC/IBAN check. |
| 105 | + |
| 106 | +iban |
| 107 | +~~~~ |
| 108 | + |
| 109 | +**type**: ``string`` **default**: ``null`` |
| 110 | + |
| 111 | +An IBAN to validate the BIC with. |
| 112 | + |
| 113 | +ibanPropertyPath |
| 114 | +~~~~~~~~~~~~~~~~ |
| 115 | + |
| 116 | +**type**: ``string`` **default**: ``null`` |
| 117 | + |
| 118 | +It defines the object property whose value is an IBAN used to check the BIC with. |
| 119 | + |
| 120 | +For example, if you want to compare the ``$bic`` property of some object |
| 121 | +with regard to the ``$iban`` property of the same object, use |
| 122 | +``propertyPath="iban"`` in the comparison constraint of ``$bic``. |
| 123 | + |
95 | 124 | .. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code
|
0 commit comments