validate method

  1. @override
Either<ValidationError, V> validate(
  1. String value
)
override

A pure function that validates the given value and returns the result as Either<E, V>, encoding either a corresponding model value or an error message.

Implementation

@override
Either<ValidationError, V> validate(String value) =>
    value.isEmpty ? Either.left(whenEmpty(value)) : super.validate(value);