composeOR static method

ValidatorFunction composeOR(
  1. List<ValidatorFunction> validators
)

Compose multiple validators into a single validator that returns the union of the individual error maps for the provided control of multiple validators.

The argument validators must not be null.

If at least one of the validators evaluates as 'VALID' then the compose validator evaluates as 'VALID' and returns null, otherwise returns the union of all the individual errors returned by each validator.

Implementation

static ValidatorFunction composeOR(List<ValidatorFunction> validators) {
  return ComposeOrValidator(validators).validate;
}