check method
Creates a new validator that nests checks on an object field.
If both the calling validator and the additional check fail, the error produced by the calling is returned.
Implementation
Validator<S> check(Predicate<S> predicate, {required dynamic error}) {
final Validator<S> predicateValidator =
(S s) => predicate(s) ? Right(s) : Left([error]);
return _join(this, predicateValidator);
}