From 9dd2925a861005f8e2d9344cc4575086d1ba112f Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sun, 25 Dec 2016 20:36:59 -0500 Subject: [PATCH] Needs tests --- README.md | 2 +- lib/src/validator.dart | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) 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, '');