everyvalidator operates over an array and it will only return a valid result if all validators in the array are valid. The
everyvalidator will short-circuit (exit early) as soon as an invalid result is encountered. This allows chaining of validators where one validator's logic might depend on a previous validator already being valid.
everyvalidator factory is the array of validators. Validator props can also be supplied either as an object or as a function that accepts context and returns a validator props object.
every: The array of validation results produced during validation
everyvalidator adds an
everyproperty to the validation result with the validation results of every validator that was validated in the array of validators. Validators that were not executed because of validation failing early will be omitted from this array. The validation result property is named
everyto match the name of the validator (this is a common pattern in Strickland).
requiredvalidator added the
required: trueproperty to the result
minLengthvalidator added the
minLength: 5property to the result
requiredvalidator was replaced with the
maxLengthvalidator was not executed
maxLengthvalidator are not included on the result
everyarray in the result does not include an item for the
isValidprop on the result reflects the overall validation result