make BIC optional, fix IBAN validator
This commit is contained in:
parent
4e6b8ec6f0
commit
1c2bab4491
3 changed files with 12 additions and 6 deletions
|
|
@ -76,7 +76,9 @@ validateBic = (target) => {
|
|||
validateIban = (target) => {
|
||||
if (target.value.length == 0) return
|
||||
// IBANs are fucking complicated. this is a hugely simplified check
|
||||
const re = /^[a-z]{2}[0-9]{20}$/i;
|
||||
// If you want to know more look here:
|
||||
// https://www.swift.com/standards/data-standards/iban-international-bank-account-number
|
||||
const re = /^[a-z]{2}[0-9a-z]+$/i;
|
||||
|
||||
if (re.test(target.value)) {
|
||||
target.classList.remove("is-danger")
|
||||
|
|
|
|||
Loading…
Reference in a new issue