@gov-cy/govcy-express-services 1.6.6 → 1.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1817,12 +1817,18 @@ The validation rules for each element are defined in the `"validations` array fo
1817
1817
 
1818
1818
  - `valid`: Checks the value against the specified rule's `checkValue`. Available rules:
1819
1819
  - `noSpecialChars`: Consists only of letters, numbers and some other characters
1820
- - `numeric`: Numeri input
1820
+ - `noSpecialCharsEl`: Consists only of Greek letters, numbers and some other characters
1821
+ - `textWide_EL`: Consists of Greek Letters and a wider range of characters
1822
+ - `textWide_EL_Latn`: Consists of Greek Letters, Latin letters, numbers and a wider range of characters
1823
+ - `textWide_EL_Latn_TR`: Consists of Greek Letters, Latin letters, Turkish letters, numbers and a wider range of characters
1824
+ - `textWide_UTF`: Consists of any letters, numbers and a wider range of characters
1825
+ - `numeric`: Numeric input
1821
1826
  - `numDecimal`: Numeric decimal input
1822
1827
  - `currency`: Currency input (numeric with 2 decimal places)
1823
1828
  - `alpha`: Alphabetic input
1824
1829
  - `alphaNum`: Alphanumeric input
1825
1830
  - `name`: Name input
1831
+ - `nameCY`: Name input for Cyprus (Greek, Latin and Turkish characters)
1826
1832
  - `tel`: Telephone input
1827
1833
  - `mobile`: Mobile input
1828
1834
  - `telCY`: Cyprus telephone input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gov-cy/govcy-express-services",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "An Express-based system that dynamically renders services using @gov-cy/govcy-frontend-renderer and posts data to a submission API.",
5
5
  "author": "DMRID - DSF Team",
6
6
  "license": "MIT",
@@ -29,6 +29,10 @@ function validateValue(value, rules) {
29
29
  alphaNum: (val) => /^[A-Za-zΑ-Ωα-ω\u0370-\u03ff\u1f00-\u1fff0-9\s]+$/.test(val),
30
30
  noSpecialChars: (val) => /^([0-9]|[A-Z]|[a-z]|[α-ω]|[Α-Ω]|[,]|[.]|[-]|[(]|[)]|[?]|[!]|[;]|[:]|[\n]|[\r]|[ _]|[\u0370-\u03ff\u1f00-\u1fff])+$/.test(val),
31
31
  noSpecialCharsEl: (val) => /^([0-9]|[α-ω]|[Α-Ω]|[,]|[.]|[-]|[(]|[)]|[?]|[!]|[;]|[:]|[\n]|[\r]|[ _]|[\u0370-\u03ff\u1f00-\u1fff])+$/.test(val),
32
+ textWide_EL: (val) => /^([0-9Α-Ωα-ω\u0370-\u03FF\u1F00-\u1FFF\s\n\r,.\-–—·'’‘"“”«»!?;:\/\\(){}\[\]<>*&@#$£€%+=_|])+$/u.test(val),
33
+ textWide_EL_Latn: (val) => /^([A-Za-zΑ-Ωα-ω\u0370-\u03FF\u1F00-\u1FFF0-9\s\n\r,.\-–—·'’‘"“”«»!?;:\/\\(){}\[\]<>*&@#$£€%+=_|])+$/u.test(val),
34
+ textWide_EL_Latn_TR: (val) => /^([A-Za-zğĞıİşŞöÖüÜçÇΑ-Ωα-ω\u0370-\u03FF\u1F00-\u1FFF0-9\s\n\r,.\-–—·'’‘"“”«»!?;:\/\\(){}\[\]<>*&@#$£€%+=_|])+$/u.test(val),
35
+ textWide_UTF: (val) => /^([\p{L}\p{M}\p{N}\s\n\r,.\-–—·'’‘"“”«»!?;:\/\\(){}\[\]<>*&@#$£€%+=_|])+$/u.test(val),
32
36
  name: (val) => /^[\p{L}\p{M}\s’‘ʼ.-]+$/u.test(val),
33
37
  nameCY: (val) => /^[A-Za-zΑ-Ωα-ωΆ-Ώά-ώΪΫϊΐϋΰÇĞİIŞÖÜçğışöü\s.’‘ʼ-]*$/u.test(val),
34
38
  tel: (val) => /^(?:\+|00)?[\d\s\-()]{8,20}$/.test(val.replace(/[\s\-()]/g, '')),