5. Validation
DOGs comes with a set of default validators:
Optional/Nullable fields are (for included validators) valid if they are null.
To use these validators, import package:dogs_core/dogs_validation.dart
to the file containing your model.
Validators can be applied to fields by using them as annotations:
An instance of the previous type can then be validated using the generated extensions on User:
Validation can also be done without using generated extensions:
Last updated