Product teams should be thinking differently about documents.Read blog post.
Anvil Logo
Products
Industries
Resources
Developers
Webform editor

Set field character limits

Some field types like numeric text already allow you to set a minimum and maximum length through the UI. For other fields like short and long text field types, you’ll need to set min and max character length with the advanced JSON editor.

Please note that the advanced JSON editor is only available on Custom plans.

Back to Help Center

Character limits are set at the individual field level and both minimums and maximums can be set simultaneously or individually. Permissible length must be defined as a character count, so you’ll need to determine how many characters you’d like to allow and enter that number in your validation.

Character limit validation error messages can’t be customized. If the user submission value doesn’t meet validation criteria, then either of the following messages will be displayed after the user exits the input field:

  • "Should not be longer than _"
  • "Should not be shorter than _"

Set character limits on fields

Here are the validation keys you can add to your short and long text type fields:

  "validation": {
    "minLength": 15,
    "maxLength": 100
  },
Back to Help Center

Other common posts

1 - 0 of 0

Sign up for a live demo

Request a 30-minute live demo today and we'll get in touch shortly. During the meeting our Sales team will help you find the right solution, including:
  • Simplifying data gathering
  • Streamlining document preparation
  • Requesting e-signatures
  • Building and scaling your business
Want to try Anvil first?Sign up for free
Want to try Anvil first?Sign up for free