dartx_validation_generator

Creator: coderz1093

Last updated:

0 purchases

dartx_validation_generator Image
dartx_validation_generator Images

Languages

Categories

Add to Cart

Description:

dartx validation generator

dartx_validation - Dart object validation made easy! #
Librabry that is inspired by javax.validation
Examples #
@Valid()
class FooSize {
@Size(min:1)
final List<String> list;
FooSize(this.list);
}
copied to clipboard
Will generate
class FooSizeValidator {
List<ValidationError> validate(FooSize model) {
var errors = <ValidationError>[];
;
if (model.list!.length < 1)
errors.add(ValidationError('list', 'must contain at least 1 elements'));
return errors;
;
}
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.