Function merge

  • Merge the validated fields of an object

    Type Parameters

    • T

      The validated type

    Parameters

    Returns Validated<T>

    Example

    merge({ a: isNumber("1"), b: isNumber(2), c: isNumber("3") }) >>
    {
    valid: false,
    error: {
    a: 'Not a number: "1"',
    c: 'Not a number: "3"',
    },
    };