call method

  1. @override
String? call(
  1. I? value
)
override

Invoke validation

Implementation

@override
String? call(I? value) {
  String? lastError;
  for (Validator<I> validator in validators) {
    final String? error = validator(value);

    if (error == null) {
      return null;
    }

    lastError = error;
  }

  return lastError;
}