throwInstead function
Returns a EskValidator that throws a ValidatorFailedException instead of returning a result
Implementation
IEskValidator throwInstead(IEskValidator validator) => EskValidator((value) {
final result = validator.validate(value);
if (result.isNotValid) throw ValidatorFailedException(result);
return EskResult.valid(value);
});