How to put constraints on Form answers

Is there any way to put restrictions on the type of answers users type into a Form text field?
I want to enforce users to submit only student emails before their verification on the webpage (@whatever.edu.whatever), and make it so that the ‘.edu’ part is required.
Any help is appreciated!

You need to be precise on what you want to consider as valid input.

If you’re looking to allow any string that ends in @whatever.edu then you can use HTML5 input patterns. Add a custom attribute to the text input element as;

name - pattern
value - .*@whatever\.edu$

Assuming it’s and email you can further validate it by setting the field type to Email.

1 Like