validateOrThrow method
Works the same as validate, validates that a given value is valid, but throws instead if it's not.
Implementation
EskResult validateOrThrow(dynamic value) {
final result = validate(value);
if (result.isNotValid) throw ValidatorFailedException(result);
return result;
}