Function Is

  • Adds custom validator

    Parameters

    • name: string

      Name of validator

    • validator: ((value) => any)

      Validator function

        • (value): any
        • Parameters

          • value: any

          Returns any

    Returns Function

  • Adds custom validator

    Parameters

    • validator: ((value) => any)

      Validator function

        • (value): any
        • Parameters

          • value: any

          Returns any

    Returns Function

  • Will only allow values, that match the string regex or real regex

    Parameters

    • arg: string | RegExp | (string | RegExp)[] | {
          args: string | RegExp | (string | RegExp)[];
          msg: string;
      }

    Returns Function

Generated using TypeDoc