Function checkAnyOf

  • Requires that at least one of the specified validators are satisfied.

    If none of the specified validators are satisfied, the specified validation error is used.

    The validationError parameter supports special options:

    • "use-first-error" - The first error is used, using the same order as checkers. See USE_FIRST_ERROR
    • "use-last-error" - The last error is used, using the same order as checkers. See USE_LAST_ERROR
    • string - An error
    • function - A function that produces a validation error, which can be used, for example, to combine the results

    Type Parameters

    • T

    Parameters

    Returns ValidationCheckerFunction<T>

Generated using TypeDoc