@typia/website
    Preparing search index...

    Type Alias MaxLength<Value>

    MaxLength: tags.TagBase<
        {
            exclusive: true;
            kind: "maxLength";
            schema: { maxLength: Value };
            target: "string";
            validate: `$input.length <= ${Value}`;
            value: Value;
        },
    >

    String maximum length constraint tag.

    Validates that a string's length is less than or equal to the specified value. This tag enforces an upper limit on the number of characters in a string.

    Examples: type ShortComment = string & MaxLength<200>; // Comment limited to 200 characters type ZipCode = string & MaxLength<10>; // Zip code with max 10 characters

    Type Parameters

    • Value extends number

    Jeongho Nam - https://github.com/samchon