Set minimum length for a text field on form? | Community
Skip to main content
Kelly_Sheetz
Level 2
September 7, 2017
Question

Set minimum length for a text field on form?

  • September 7, 2017
  • 2 replies
  • 5697 views

Is there a way to natively set the minimum character limit for a text or number field in a form? I want to set a field to exactly 12 characters and have an error message appear if a lead enters anything less than 12 characters. If not, is there a javascript that anyone has used to accomplish this?

Thanks in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
Level 10
September 7, 2017

If you move the Q to Products​ I'll answer there (should be a Move button at the right).

Kelly_Sheetz
Level 2
September 7, 2017

Moved

SanfordWhiteman
Level 10
September 8, 2017

If you set the field to Text and use the Mask Input option (at the lower right in Form Editor), you can set the the pattern to

     ************

which is exactly 12 alphanumeric characters.

Kelly_Sheetz
Level 2
September 8, 2017

Since I am looking for a minimum and maximum of 12 numeric values, I used 999999999999 (12). When I test a live form, I am still able to submit the form with less than 12 numbers.

SanfordWhiteman
Level 10
September 8, 2017

Post a link to that form.

Kelly_Sheetz
Level 2
September 8, 2017

Here you go: AWS Activate