call method

String? call(
  1. String? value
)

Executes the validation logic against the given value.

Returns:

  • null if the value is valid
  • errorMessage if validation fails

Implementation

String? call(String? value) {
  final result = validate(value);
  return result == null ? null : errorMessage;
}