Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Commit 1c67eb8

Browse files
committed
Merge pull request #22 from tlastad/master
Added nev validator "checked" and strings for INVALID_CHECKBOX_SELECTED
2 parents d97f298 + 1013721 commit 1c67eb8

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

locales/validation/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"INVALID_REQUIRED": "Field is required. ",
5252
"INVALID_URL": "Must be a valid URL. ",
5353
"INVALID_TIME": "Must be a valid time format (hh:mm) OR (hh:mm:ss). ",
54+
"INVALID_CHECKBOX_SELECTED": "Checkbox must be selected",
5455

5556
"AREA1": "TextArea: Alphanumeric + Minimum(15) + Required",
5657
"ERRORS": "Errors",

locales/validation/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"INVALID_REQUIRED": "El campo es requerido. ",
5252
"INVALID_URL": "Debe contener una dirección URL valida. ",
5353
"INVALID_TIME": "Debe contener un formato de tiempo valido (hh:mm) ó (hh:mm:ss). ",
54+
"INVALID_CHECKBOX_SELECTED": "Checkbox must be selected",
5455

5556
"AREA1": "Area de texto: Alfanúmerica + Minimo(15) + Requerido",
5657
"ERRORS": "Errores",

locales/validation/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"INVALID_REQUIRED": "Le champ est requis. ",
5252
"INVALID_URL": "Doit être un URL valide. ",
5353
"INVALID_TIME": "Doit être un format de date valide (hh:mm) OU (hh:mm:ss). ",
54+
"INVALID_CHECKBOX_SELECTED": "Checkbox must be selected",
5455

5556
"AREA1": "TextArea: Alphanumérique + Minimum(15) + Required",
5657
"ERRORS": "Erreurs",

locales/validation/no.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"INVALID_REQUIRED": "Feltet er påkrevd. ",
5252
"INVALID_URL": "Må være en gyldig URL. ",
5353
"INVALID_TIME": "Må være et gyldig tidsformat (tt:mm) OR (tt:mm:ss). ",
54+
"INVALID_CHECKBOX_SELECTED": "Du må krysse av.",
5455

5556
"AREA1": "TextArea: Alfanumerisk + Minimum(15) + Påkrevd",
5657
"ERRORS": "Feil",

src/validation-rules.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,13 @@ angular
541541
type: "regex"
542542
};
543543
break;
544+
case "checked":
545+
validator = {
546+
pattern: "^true$",
547+
message: "INVALID_CHECKBOX_SELECTED",
548+
type: "regex"
549+
};
550+
break;
544551
} // switch()
545552

546553
// add the possible alternate text user might have provided

0 commit comments

Comments
 (0)