From 3cb3681c66560a6ba138c1fd95c042c3d10302df Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sat, 25 Feb 2017 00:48:52 -0500 Subject: [PATCH] Update user.dart --- lib/src/validators/user.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/src/validators/user.dart b/lib/src/validators/user.dart index 9080ce7..e094496 100644 --- a/lib/src/validators/user.dart +++ b/lib/src/validators/user.dart @@ -1,7 +1,10 @@ import 'package:angel_validate/angel_validate.dart'; -final Validator CREATE_USER = new Validator({ - 'email*': [isString, isEmail], - 'username*': [isString, isNotEmpty], - 'password*': [isString, isNotEmpty] +final Validator USER = new Validator({ + 'email': [isString, isNotEmpty, isEmail], + 'username': [isString, isNotEmpty], + 'password': [isString, isNotEmpty] }); + +final Validator CREATE_USER = USER.extend({}) + ..requiredFields.addAll(['email', 'username', 'password']);