1
0
Fork 0

fixed validation rules

This commit is contained in:
Frank Celler 2015-01-07 13:26:20 +01:00
parent 8e0641b70f
commit 49cb009186
1 changed files with 3 additions and 3 deletions

View File

@ -720,8 +720,8 @@
validateInput: function() {
return [
{
rule: Joi.string().required().regex(/^[a-zA-Z]+$/),
msg: "Can only contain a to z or A to Z."
rule: Joi.string().required().regex(/^[a-zA-Z-_][a-zA-Z0-9-_]*$/),
msg: "Can only contain a to z, A to Z, 0-9, '-' and '_'."
}
];
}
@ -744,7 +744,7 @@
validateInput: function() {
return [
{
rule: Joi.string().required().regex(/^[a-zA-Z]+$/),
rule: Joi.string().required().regex(/^[a-zA-Z0-9 .,;-]+$/),
msg: "Has to be non empty."
}
];