This commit is contained in:
Tobe O 2017-10-19 17:59:45 -04:00
parent 21acfb85f4
commit 46b3d880d0
2 changed files with 1 additions and 15 deletions

View file

@ -1,15 +0,0 @@
import 'package:angel_validate/angel_validate.dart';
// Validators can be used on the server, in the browser, and even in Flutter.
//
// It is highly recommended that you read the documentation:
// https://github.com/angel-dart/validate
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'])
..forbiddenFields.addAll(['salt', 'roles']);

View file

@ -14,6 +14,7 @@ dependencies:
angel_hot: ^1.1.0-alpha # Hot-reloading support. :)
angel_jael: ^1.0.0-alpha # Server-side templating engine
angel_static: ^1.3.0-alpha # Static file server
angel_validate: ^1.0.0 # Allows for validation of input data
dev_dependencies:
angel_serialize_generator: ^1.0.0-alpha # Generates serialization code for models.
angel_test: ^1.1.0-alpha # Utilities for testing Angel servers.