Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 51f833b

Browse filesBrowse files
committed
Validate a BIC along with an IBAN
1 parent 1bbaa64 commit 51f833b
Copy full SHA for 51f833b

File tree

1 file changed

+30
-1
lines changed
Filter options

1 file changed

+30
-1
lines changed

‎reference/constraints/Bic.rst

Copy file name to clipboardExpand all lines: reference/constraints/Bic.rst
+30-1Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ Bic
33

44
This constraint is used to ensure that a value has the proper format of a
55
`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.
78

89
+----------------+-----------------------------------------------------------------------+
910
| Applies to | :ref:`property or method <validation-property-target>` |
1011
+----------------+-----------------------------------------------------------------------+
1112
| Options | - `message`_ |
1213
| | - `payload`_ |
14+
| | - `iban`_ |
15+
| | - `ibanMessage`_ |
16+
| | - `ibanPropertyPath`_ |
1317
+----------------+-----------------------------------------------------------------------+
1418
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Bic` |
1519
+----------------+-----------------------------------------------------------------------+
@@ -92,4 +96,29 @@ The default message supplied when the value does not pass the BIC check.
9296

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

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+
95124
.. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.