any<T> static method

FormeValidator<T> any<T>(
  1. List<FormeValidator<T>> validators, {
  2. String errorText = '',
})

when valid

  1. any validator return null

Implementation

static FormeValidator<T> any<T>(List<FormeValidator<T>> validators,
    {String errorText = ''}) {
  return (f, T v) {
    for (final FormeValidator<T> validator in validators) {
      if (validator(f, v) == null) {
        return null;
      }
    }
    return errorText;
  };
}