Update user.dart
This commit is contained in:
parent
305ae2c216
commit
3cb3681c66
1 changed files with 7 additions and 4 deletions
|
@ -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']);
|
||||
|
|
Loading…
Reference in a new issue