diff --git a/README.md b/README.md index 0bb56c5f..6ddfcd83 100644 --- a/README.md +++ b/README.md @@ -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 `overwrite` flag to `true`. diff --git a/lib/src/validator.dart b/lib/src/validator.dart index 47b2c299..390e316d 100644 --- a/lib/src/validator.dart +++ b/lib/src/validator.dart @@ -149,8 +149,6 @@ class Validator extends Matcher { _schema[fieldName] = schema[key]; } - - return child; } else { for (var key in schema.keys) { var fieldName = key.replaceAll(_asterisk, '').replaceAll(_optional, '');