From 0e8213add72dad0177fcc9fe0e1893ecdd4c96e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alja=C5=BE=20Starc?= Date: Sun, 26 Nov 2023 14:52:10 +0000 Subject: [PATCH] path iban regex --- index.js | 2 +- views/index.ejs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index daa05ce..7690d37 100644 --- a/index.js +++ b/index.js @@ -37,7 +37,7 @@ app.get('/api/qrcode', async (req, res) => { check('client_city', /^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i) check('amount', /^(?=.{11}$)[0]{1,11}[0-9]{0,11}$/) check('payment_purpose', /^.{1,42}$/i) - check('iban', /^[A-Z]{2}\d{17}$/) + check('iban', /^[A-Z]{2}[A-Z0-9]{17}$/) check('reference', /^[A-Z]{2}[0-9\-]{1,24}$/) check('issuer_name', /^[a-zA-Z0-9ČŠŽĐ.'](?:[A-Z0-9 ČŠŽĐ.'\-]{0,31}[A-Z0-9ČŠŽĐ.'])?$/i) check('issuer_address', /^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ\-.]{0,31}[A-Z0-9ČŠŽĐ])?$/i) diff --git a/views/index.ejs b/views/index.ejs index d0da240..1d24906 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -289,11 +289,11 @@ updateQR()
🔗 iban
- Regex: ^[A-Z]{2}\d{17}$ + Regex: ^[A-Z]{2}[A-Z0-9]{17,19}$
- Demo: regex101.com/r/8bXDvh/1 + Demo: regex101.com/r/dN0DsH/1
- Description: Must contain country code (exp. SI56). No spaces allowed. Max length 34 characters + Description: Must contain country code (exp. SI56). No spaces allowed. Max length 21 characters
Example: SI56047500000280672