Function validateWith

  • Validate an input's fields with validators

    Type Parameters

    • T

      The validated type

    Parameters

    Returns Validator<T>

    Example

    validateWith({ a: isNumber, b: isString })({ a: 1, b: "2" }) >>
    {
    valid: true,
    input: { a: 1, b: "2" },
    };