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

Commit

Permalink
Merge pull request #22 from tlastad/master
Browse files Browse the repository at this point in the history
Added nev validator "checked" and strings for INVALID_CHECKBOX_SELECTED
  • Loading branch information
ghiscoding committed Apr 8, 2015
2 parents d97f298 + 1013721 commit 1c67eb8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions locales/validation/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"INVALID_REQUIRED": "Field is required. ",
"INVALID_URL": "Must be a valid URL. ",
"INVALID_TIME": "Must be a valid time format (hh:mm) OR (hh:mm:ss). ",
"INVALID_CHECKBOX_SELECTED": "Checkbox must be selected",

"AREA1": "TextArea: Alphanumeric + Minimum(15) + Required",
"ERRORS": "Errors",
Expand Down
1 change: 1 addition & 0 deletions locales/validation/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"INVALID_REQUIRED": "El campo es requerido. ",
"INVALID_URL": "Debe contener una dirección URL valida. ",
"INVALID_TIME": "Debe contener un formato de tiempo valido (hh:mm) ó (hh:mm:ss). ",
"INVALID_CHECKBOX_SELECTED": "Checkbox must be selected",

"AREA1": "Area de texto: Alfanúmerica + Minimo(15) + Requerido",
"ERRORS": "Errores",
Expand Down
1 change: 1 addition & 0 deletions locales/validation/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"INVALID_REQUIRED": "Le champ est requis. ",
"INVALID_URL": "Doit être un URL valide. ",
"INVALID_TIME": "Doit être un format de date valide (hh:mm) OU (hh:mm:ss). ",
"INVALID_CHECKBOX_SELECTED": "Checkbox must be selected",

"AREA1": "TextArea: Alphanumérique + Minimum(15) + Required",
"ERRORS": "Erreurs",
Expand Down
1 change: 1 addition & 0 deletions locales/validation/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"INVALID_REQUIRED": "Feltet er påkrevd. ",
"INVALID_URL": "Må være en gyldig URL. ",
"INVALID_TIME": "Må være et gyldig tidsformat (tt:mm) OR (tt:mm:ss). ",
"INVALID_CHECKBOX_SELECTED": "Du må krysse av.",

"AREA1": "TextArea: Alfanumerisk + Minimum(15) + Påkrevd",
"ERRORS": "Feil",
Expand Down
7 changes: 7 additions & 0 deletions src/validation-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,13 @@ angular
type: "regex"
};
break;
case "checked":
validator = {
pattern: "^true$",
message: "INVALID_CHECKBOX_SELECTED",
type: "regex"
};
break;
} // switch()

// add the possible alternate text user might have provided
Expand Down

0 comments on commit 1c67eb8

Please sign in to comment.