assertValidate method
If any of the validators fail with the given map
, a
ValidationCollectionException will be thrown with all the offending
ValidationExceptions
Implementation
void assertValidate(Map<String, dynamic> map) {
final exceptions = <ValidationException>[];
for (final validator in validators) {
try {
validator.assertValidate(map);
} on ValidationException catch (e) {
exceptions.add(e);
}
}
if (exceptions.isEmpty) {
return;
}
throw ValidationCollectionException(exceptions);
}