Function minLength

  • Create a validator that checks if the string is no less than n characters long.

    Returns

    A validator that checks if the string is at least n characters long.

    Parameters

    • n: number

      The minimum length of the string.

    • message: string | MessageResolver<number>

      The error message to use if the string is too short.

    Returns Validator<string>

Generated using TypeDoc