Google
Miscellaneous

How to restrict word limit in google form?

While designing Google Form we may need to restrict user to answer question under specified character or words limit. Though Microsoft form does not have this functionality as of now. From my personal experience, Google Forms are much better than MS Forms.

If you want to collect input in your organization use MS Form. But if you want to collect inputs from external users, my suggestion would be for Google Form.

To set character or word limit for your question(specially for short answer type) in Google Form ,we will use regex (regular expression).

Regex for character limit-  [\w]{1,200}

Regex for word limit- ^[-\w]+(?:\W+[-\w]+){1,200}\W*$

For character limit I have used character range  1 to 200. You can set your range as per your need. Similarly you can set a range for word limits.

Please follow below steps-

  1. Open your Google form via link
  2. In question, click on 3 vertical dots & click on ‘Response Validation’-Logic
    1. Select Regular expression
    2. Choose- Matches
    3. Your regular expression : in my case, [\w]{1,200}
    4. Warning message: Characters limit exceeded.
  3. Similarly you can setup response validation regex for words limit.
  4. Outcome-output

 

Additional Inputs-

Other useful Regex-

  1. For Email Address-     [a-zA-Z0-9_\.\+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-\.]+
  2. For ZIP Code (Indian Zip Code)-  ^\d{5,6}(?:[-\s]\d{4})?$

– Gopenly Team

Leave a Reply