validate method
Validates value
against this validator.
Implementation
@override
bool validate(cached, value, DogEngine engine) {
final entry = cached as _ValidatedCacheEntry;
final validatorMode =
engine.modeRegistry.validation.forTypeNullable(entry.serial, engine);
if (validatorMode == null) return true;
if (entry.iterable) {
if (value == null) return true;
return (value as Iterable)
.every((e) => _validateSingle(e, validatorMode, engine));
} else {
return _validateSingle(value, validatorMode, engine);
}
}