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);
}
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;
;
}
}
Libraries
- annotation_reader
- code_builders/annotation_processors/annotation_processor
- code_builders/annotation_processors/email_annotation_processor
- code_builders/annotation_processors/lenght_annotation_processor
- code_builders/annotation_processors/max_annotation_processor
- code_builders/annotation_processors/min_annotation_processor
- code_builders/annotation_processors/not_blank_annotation_processor
- code_builders/annotation_processors/not_empty_annotation_processor
- code_builders/annotation_processors/not_null_annotation_processor
- code_builders/annotation_processors/size_annotation_processor
- code_builders/class_builder
- code_builders/method_builder
- generators/validator_generator
- integrations/builder