Update user.dart

This commit is contained in:
Tobe O 2017-02-25 00:48:52 -05:00 committed by GitHub
parent 305ae2c216
commit 3cb3681c66

View file

@ -1,7 +1,10 @@
import 'package:angel_validate/angel_validate.dart'; import 'package:angel_validate/angel_validate.dart';
final Validator CREATE_USER = new Validator({ final Validator USER = new Validator({
'email*': [isString, isEmail], 'email': [isString, isNotEmpty, isEmail],
'username*': [isString, isNotEmpty], 'username': [isString, isNotEmpty],
'password*': [isString, isNotEmpty] 'password': [isString, isNotEmpty]
}); });
final Validator CREATE_USER = USER.extend({})
..requiredFields.addAll(['email', 'username', 'password']);