Skip to content

Commit

Permalink
Added: it alphas validation (\xC0-\xFF is for òàù etc.) (#1975)
Browse files Browse the repository at this point in the history
🔎 __Overview__

Added `IT` locale to `alpha, alphaSpaces, alphanumeric, alphaDash` validations.
`\xC0-\xFF` is for ÀàÈè and other chars.

Ex (Feat):
> This PR adds the IT alpha validation.
  • Loading branch information
exodusanto authored and logaretm committed Apr 1, 2019
1 parent 2d3453b commit 915b65e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rules/alpha_helper.js
Expand Up @@ -10,6 +10,7 @@ export const alpha = {
de: /^[A-ZÄÖÜß]*$/i,
es: /^[A-ZÁÉÍÑÓÚÜ]*$/i,
fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,
it: /^[A-Z\xC0-\xFF]*$/i,
lt: /^[A-ZĄČĘĖĮŠŲŪŽ]*$/i,
nl: /^[A-ZÉËÏÓÖÜ]*$/i,
hu: /^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,
Expand All @@ -32,6 +33,7 @@ export const alphaSpaces = {
de: /^[A-ZÄÖÜß\s]*$/i,
es: /^[A-ZÁÉÍÑÓÚÜ\s]*$/i,
fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\s]*$/i,
it: /^[A-Z\xC0-\xFF\s]*$/i,
lt: /^[A-ZĄČĘĖĮŠŲŪŽ\s]*$/i,
nl: /^[A-ZÉËÏÓÖÜ\s]*$/i,
hu: /^[A-ZÁÉÍÓÖŐÚÜŰ\s]*$/i,
Expand All @@ -54,6 +56,7 @@ export const alphanumeric = {
de: /^[0-9A-ZÄÖÜß]*$/i,
es: /^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,
fr: /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,
it: /^[0-9A-Z\xC0-\xFF]*$/i,
lt: /^[0-9A-ZĄČĘĖĮŠŲŪŽ]*$/i,
hu: /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,
nl: /^[0-9A-ZÉËÏÓÖÜ]*$/i,
Expand All @@ -76,6 +79,7 @@ export const alphaDash = {
de: /^[0-9A-ZÄÖÜß_-]*$/i,
es: /^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,
fr: /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,
it: /^[0-9A-Z\xC0-\xFF_-]*$/i,
lt: /^[0-9A-ZĄČĘĖĮŠŲŪŽ_-]*$/i,
nl: /^[0-9A-ZÉËÏÓÖÜ_-]*$/i,
hu: /^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,
Expand Down

0 comments on commit 915b65e

Please sign in to comment.