validate method
Performs type coercion against an input
value, and returns a list of errors if the validation was unsuccessful.
Implementation
@override
ValidationResult<T> validate(String key, T input) {
var ret = super.validate(key, input);
if (ret.successful && input > max) {
ret = ValidationResult._failure(
['Value ($input) can not be greater than $max']);
}
return ret;
}