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
+----------------+-----------------------------------------------------------------------+
14
18
| Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Bic ` |
15
19
+----------------+-----------------------------------------------------------------------+
@@ -102,4 +106,29 @@ You can use the following parameters in this message:
102
106
103
107
.. include :: /reference/constraints/_payload-option.rst.inc
104
108
109
+ ibanMessage
110
+ ~~~~~~~~~~~
111
+
112
+ **type **: ``string `` **default **: ``This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. ``
113
+
114
+ The default message supplied when the value does not pass the combined BIC/IBAN check.
115
+
116
+ iban
117
+ ~~~~
118
+
119
+ **type **: ``string `` **default **: ``null ``
120
+
121
+ An IBAN to validate the BIC with.
122
+
123
+ ibanPropertyPath
124
+ ~~~~~~~~~~~~~~~~
125
+
126
+ **type **: ``string `` **default **: ``null ``
127
+
128
+ It defines the object property whose value is an IBAN used to check the BIC with.
129
+
130
+ For example, if you want to compare the ``$bic `` property of some object
131
+ with regard to the ``$iban `` property of the same object, use
132
+ ``propertyPath="iban" `` in the comparison constraint of ``$bic ``.
133
+
105
134
.. _`Business Identifier Code (BIC)` : https://en.wikipedia.org/wiki/Business_Identifier_Code
0 commit comments