Validate an array of inputs with a fallback
The validated type
The validator to use
The fallback
validateEachOr(isNumber, 0)([1, 2, 3]) >> [1, 2, 3]; validateEachOr(isNumber, 0)(["1", 2, "3"]) >> [0, 2, 0]; Copy
validateEachOr(isNumber, 0)([1, 2, 3]) >> [1, 2, 3]; validateEachOr(isNumber, 0)(["1", 2, "3"]) >> [0, 2, 0];
Validate an array of inputs with a fallback