Needs tests
This commit is contained in:
parent
dae413cd0a
commit
9dd2925a86
2 changed files with 1 additions and 3 deletions
|
@ -154,7 +154,7 @@ var ageIsOptional = userValidator.extend({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that by default, new validation rules are simply prepended to
|
Note that by default, new validation rules are simply appended to
|
||||||
the existing list. To completely overwrite existing rules, set the
|
the existing list. To completely overwrite existing rules, set the
|
||||||
`overwrite` flag to `true`.
|
`overwrite` flag to `true`.
|
||||||
|
|
||||||
|
|
|
@ -149,8 +149,6 @@ class Validator extends Matcher {
|
||||||
|
|
||||||
_schema[fieldName] = schema[key];
|
_schema[fieldName] = schema[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
return child;
|
|
||||||
} else {
|
} else {
|
||||||
for (var key in schema.keys) {
|
for (var key in schema.keys) {
|
||||||
var fieldName = key.replaceAll(_asterisk, '').replaceAll(_optional, '');
|
var fieldName = key.replaceAll(_asterisk, '').replaceAll(_optional, '');
|
||||||
|
|
Loading…
Reference in a new issue