Function validateEach

  • Validate an array of inputs individually

    Type Parameters

    • T

      The validated type

    Parameters

    Returns ((input) => Validated<T>[])

    Example

    validateEach(isNumber)([1, "2"]) >>
    [
    {
    valid: true,
    parsed: 1,
    },
    {
    valid: false,
    error: 'Not a number: "2"',
    },
    ];