'Validate 2 Conditions in Google Forms Field

I have a field in one of my survey google form which ask for a whole number and in this post Regular Expression Google Forms i learn how to do this validation with regex.

Now i need the same field not only to validate if its a whole number, but also to validate min (120) and max (10000) value.

Is this possible with regex or with google apps?

Here is the actual regex which validates whole numbers only

[0-9]+

Thanks!



Solution 1:[1]

You can use Regex, but can be a little bit more complicated : see :

http://www.regular-expressions.info/numericranges.html

Now, as the post that you included you can also add numerical validations following almost the same steps:

  • For minimum: Advanced Settings -> Data validation -> Number -> Between
  • And put your desired range (in your case 120 and 10000).


This validation would prevent the user from entering non numerical values.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Paul Floyd