| Name | HTML attribute | Type | Description |
|---|---|---|---|
country
|
data-fv-iban___country
|
String
|
An ISO-3166 country code |
message
|
data-fv-iban___message
|
String
|
The error message |
sepa
|
data-fv-iban___sepa
|
Boolean
|
Set it to true (false) to indicate that the IBAN number must be (not be) from SEPA countries. The list of SEPA countries are indicated in the table below. By default, this option is not defined |
country
is not defined, it will be parsed from the IBAN number. The validator supports the following countries (sorted by the country code in alphabetical order):
| Country | Code | Sepa | Sample IBAN |
|---|---|---|---|
| Albania | AL | No | AL47212110090000000235698741 |
| Algeria | DZ | No | DZ4000400174401001050486 |
| Andorra | AD | No | AD1200012030200359100100 |
| Angola | AO | No | AO06000600000100037131174 |
| Austria | AT | Yes | AT611904300234573201 |
| Azerbaijan | AZ | No | AZ21NABZ00000000137010001944 |
| Bahrain | BH | No | BH29BMAG1299123456BH00 |
| Bosnia and Herzegovina | BA | No | BA3912904 |
| Belgium | BE | Yes | BE68539007547034 |
| Benin | BJ | No | BJ11B00610100400271101192591 |
| Brazil | BR | No | BR9700360305000010009795493P1 |
| Bulgaria | BG | Yes | BG80BNBG96611020345678 |
| Burkina Faso | BF | No | BF1030134020015400945000643 |
| Burundi | BI | No | BI43201011067444 |
| Cameroon | CM | No | CM2110003001000500000605306 |
| Cape Verde | CV | No | CV64000300004547069110176 |
| Costa Rica | CR | No | CR0515202001026284066 |
| Croatia | HR | Yes | HR1210010051863000160 |
| Cyprus | CY | Yes | CY17002001280000001200527600 |
| Czech Republic | CZ | Yes | CZ6508000000192000145399 |
| Denmark | DK | Yes | DK5000400440116243 |
| Dominican Republic | DO | No | DO28BAGR00000001212453611324 |
| East Timor | TL | No | TL380080012345678910157 |
| Estonia | EE | Yes | EE382200221020145685 |
| Faroe Islands | FO | No | FO1464600009692713 |
| Finland | FI | Yes | FI2112345600000785 |
| France | FR | Yes | FR1420041010050500013M02606 |
| Guatemala | GT | No | GT82TRAJ01020000001210029690 |
| Georgia | GE | No | GE29NB0000000101904917 |
| Germany | DE | Yes | DE89370400440532013000 |
| Gibraltar | GI | Yes | GI75NWBK000000007099453 |
| Greece | GR | Yes | GR1601101250000000012300695 |
| Greenland | GL | No | GL8964710001000206 |
| Hungary | HU | Yes | HU42117730161111101800000000 |
| Iceland | IS | Yes | IS1401592600339 |
| Iran | IR | No | IR580540105180021273113007 |
| Ireland | IE | Yes | IE29AIBK93115212345678 |
| Israel | IL | No | IL620108000000099999999 |
| Italy | IT | Yes | IT60X0542811101000000123456 |
| Ivory Coast | CI | No | CI05A00060174100178530011852 |
| Jordan | JO | No | JO94CBJO0010000000000131000302 |
| Kazakhstan | KZ | No | KZ176010251000042993 |
| Kuwait | KW | No | KW74NBOK0000000000001000372151 |
| Latvia | LV | Yes | LV80BANK0000435195001 |
| Lebanon | LB | No | LB30099900000001001925579115 |
| Liechtenstein | LI | Yes | LI21088100002324013AA |
| Lithuania | LT | Yes | LT121000011101001000 |
| Luxembourg | LU | Yes | LU280019400644750000 |
| Macedonia | MK | No | MK042425 |
| Madagascar | MG | No | MG4600005030010101914016056 |
| Malta | MT | Yes | MT84MALT011000012345MTLCAST001S |
| Mauritania | MR | No | MR1300012000010000002037372 |
| Mauritius | MU | No | MU17BOMM0101101030300200000MUR |
| Mali | ML | No | ML03D00890170001002120000447 |
| Moldova | MD | No | MD24AG000225100013104168 |
| Monaco | MC | Yes | MC5813488000010051108001292 |
| Montenegro | ME | No | ME25505000012345678951 |
| Mozambique | MZ | No | MZ59000100000011834194157 |
| Netherlands | NL | Yes | NL91ABNA0417164300 |
| Norway | NO | Yes | NO9386011117947 |
| Pakistan | PK | No | PK24SCBL0000001171495101 |
| Palestine | PS | No | PS92PALS000000000400123456702 |
| Poland | PL | Yes | PL27114020040000300201355387 |
| Portugal | PT | Yes | PT50000201231234567890154 |
| Qatar | QA | No | QA58DOHB00001234567890ABCDEFG |
| Republic of Kosovo | XK | No | XK051212012345678906 |
| Romania | RO | Yes | RO49AAAA1B310 |
| San Marino | SM | Yes | SM86U0322509800000000270100 |
| Saudi Arabia | SA | No | SA0380000000608010167519 |
| Senegal | SN | No | SN12K00100152000025690007542 |
| Serbia | RS | No | RS35260005601001611379 |
| Slovakia | SK | Yes | SK3112000000198742637541 |
| Slovenia | SI | Yes | SI56191000000123438 |
| Spain | ES | Yes | ES9121000418450200051332 |
| Sweden | SE | Yes | SE3550000000054910000003 |
| Switzerland | CH | Yes | CH93052957 |
| Tunisia | TN | No | TN59142129648 |
| Turkey | TR | No | TR330006100519786457841326 |
| United Arab Emirates | AE | No | AE260211000000230064016 |
| United Kingdom | GB | Yes | GB29NWBK60161331926819 |
| Virgin Islands, British | VG | No | VG96VPVG0000012345678901 |
// You might need to change the importing path
import
iban
from
'formvalidation/dist/es6/validators/iban'
;
const
result
=
iban
(
)
.
validate
(
{
value
:
...
,
options
:
{
country
:
...
,
message
:
...
,
sepa
:
...
,
}
,
}
)
;
/*
result is an object of
{
valid: true or false,
message: The error message
}
*/
// You might need to change the importing path
import
iban
from
'formvalidation/dist/es6/validators/iban'
;
const
res1
=
iban
(
)
.
validate
(
{
value
:
'AT611904300234573201'
,
options
:
{
message
:
'The value is not a valid IBAN'
,
}
,
}
)
;
// res1.valid === true
const
res2
=
iban
(
)
.
validate
(
{
value
:
'GB29NWBK6016133192681'
,
options
:
{
message
:
'The value is not a valid IBAN'
,
}
,
}
)
;
// res2.valid === false
country
option isn't passed to the placeholder message