From d183512b4bc0f8767e98cb4b97f2e845a633d53a Mon Sep 17 00:00:00 2001 From: Aljaz S Date: Wed, 17 Nov 2021 12:29:51 +0100 Subject: [PATCH] added descriptions and examples to docs --- src/index.html | 90 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 67 insertions(+), 23 deletions(-) diff --git a/src/index.html b/src/index.html index da3f1b3..24af022 100644 --- a/src/index.html +++ b/src/index.html @@ -39,81 +39,125 @@

Following the specification from official documentation - NavodilaZaProgramerjeUPNQR.pdf, section 4. Vsebina kode QR.

🔗 client_name
- Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i + Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
- Demo: regex101.com/r/t9EaM3/1 + Demo: regex101.com/r/t9EaM3/1 +
+ Description: Name and surname of the client. Max length 33 characters including spaces and numbers. +
+ Example: Peter Novak
🔗 client_address
- Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i + Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
- Demo: regex101.com/r/JA4wmM/1 + Demo: regex101.com/r/JA4wmM/1 +
+ Description: Full client address in long form. Max length 33 characters including spaces and numbers. +
+ Example: Ravna ulica 13 a
🔗 client_city
- Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i + Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
- Demo: regex101.com/r/5QMpTn/1 + Demo: regex101.com/r/5QMpTn/1 +
+ Description: Client's city including postal code +
+ Example: 1000 Ljubljana
🔗 amount
- Regex: ^(?=.{11}$)[0]{1,11}[0-9]{0,11}$ + Regex: ^(?=.{11}$)[0]{1,11}[0-9]{0,11}$
- Demo: regex101.com/r/Tyq5S1/1 + Demo: regex101.com/r/Tyq5S1/1 +
+ Description: Total amount to pay. Must contain 11 numbers. Last two numbers are decimal places (cents). +
+ Example (11,32€): 00000001132
🔗 purpose_code
- Regex: ^[A-Z]{4}$ + Regex: ^[A-Z]{4}$
- Demo: regex101.com/r/TsiZQJ/1 + Demo: regex101.com/r/TsiZQJ/1
- Default: OTHR + Default: OTHR +
+ Description: Must contain 4 uppercase characters compliant with public purpose code library www.nlb.si/sepa-koda-namena-prebivalstvo +
+ Example: OTHR
🔗 payment_purpose
- Regex: ^[A-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,40}[A-Z0-9ČŠŽĐ])?$ + Regex: ^[A-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,40}[A-Z0-9ČŠŽĐ])?$
- Demo: regex101.com/r/y7kUXP/1 + Demo: regex101.com/r/y7kUXP/1 +
+ Description: A Can contain any character including ŠČŽĐ and space. Max length 33 characters including space. +
+ Example: moutain bike first half
🔗 iban
- Regex: ^[A-Z]{2}\d{17}$ + Regex: ^[A-Z]{2}\d{17}$
- Demo: regex101.com/r/8bXDvh/1 + Demo: regex101.com/r/8bXDvh/1 +
+ Description: Must contain country code (exp. SI56). No spaces allowed. Max length 34 characters +
+ Example: SI56047500000280672
🔗 reference
- Regex: ^[A-Z]{2}[0-9\-]{1,24}$ + Regex: ^[A-Z]{2}[0-9\-]{1,24}$
- Demo: regex101.com/r/2tSYMw/1 + Demo: regex101.com/r/2tSYMw/1 +
+ Description: Must contain reference model (exp. SI00) and reference (1234-2002). Max length 4+22 numbers and minus symbols. No spaces allowed. +
+ Example: SI121234567890120
🔗 issuer_name
- Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i + Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
- Demo: regex101.com/r/DFjB0D/1 + Demo: regex101.com/r/DFjB0D/1 +
+ Description: Name and surname of the issuer or company name. Max length 33 characters including spaces and numbers. +
+ Example: Spletne strani na 123
🔗 issuer_address
- Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i + Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
- Demo: regex101.com/r/5oKk0T/1 + Demo: regex101.com/r/5oKk0T/1 +
+ Description: Full issuer address in long form. Max length 33 characters including spaces and numbers. +
+ Example: Za deveto smreko 15 k
🔗 issuer_city
- Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i + Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
- Demo: regex101.com/r/JfuNU1/1 + Demo: regex101.com/r/JfuNU1/1 +
+ Description: Issuer city including postal code +
+ Example: 1000 Ljubljana