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 633d48b

Browse filesBrowse files
committed
minor #10349 Validate a BIC along with an IBAN (sylfabre)
This PR was merged into the master branch. Discussion ---------- Validate a BIC along with an IBAN Doc for this PR: symfony/symfony#28479 Commits ------- 51f833b Validate a BIC along with an IBAN
2 parents bf99c17 + 51f833b commit 633d48b
Copy full SHA for 633d48b

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
+----------------+-----------------------------------------------------------------------+
@@ -102,4 +106,29 @@ You can use the following parameters in this message:
102106

103107
.. include:: /reference/constraints/_payload-option.rst.inc
104108

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+
105134
.. _`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.