Merge branch 'dev' of http://git.verdnatura.es/salix into dev

This commit is contained in:
Carlos Jimenez 2018-01-10 08:08:01 +01:00
commit e019731ffb
1 changed files with 2 additions and 2 deletions

View File

@ -14,8 +14,8 @@ export const validators = {
min: conf.min || conf.is, min: conf.min || conf.is,
max: conf.max || conf.is max: conf.max || conf.is
}; };
let val = String(value);
if (!validator.isLength(value, options)) { if (!validator.isLength(val, options)) {
if (conf.is) { if (conf.is) {
throw new Error(`Value should be ${conf.is} characters long`); throw new Error(`Value should be ${conf.is} characters long`);
} else if (conf.min && conf.max) { } else if (conf.min && conf.max) {