JSON Schema maxLength Keyword

maxLength caps the number of characters in a string.

Syntax

{"type": "string", "maxLength": 10}

Explanation

Use maxLength for usernames, codes and other bounded text fields.