Function requireLength

  • Creates input validator that applies requirements on input text length.

    Ignores empty input. Reports too short values with incomplete and tooShort message codes. Reports too long values with invalid and tooLong message codes.

    Parameters

    • min: undefined | number

      Required minimum length. Not checked if omitted.

    • Optional max: number

      Required maximum length. Not checked if omitted.

    Returns InValidator<string>

    Element validator applicable to text input control.

Generated using TypeDoc