Function getValidatorFunction

  • const validator = getValidatorFunction<MyType>();

    const errors: ValidationErrorItem[] = [];
    const valid = validator(data, {errors})

    if (errors.length) console.log(errors); //validation failed if not empty

    Type Parameters

    • T

    Parameters

    Returns Guard<T>

Generated using TypeDoc