验证"Google表单"字段中的2个条件 [英] Validate 2 Conditions in Google Forms Field

查看:89
本文介绍了验证"Google表单"字段中的2个条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一项调查Google表单中有一个字段,要求输入整数,而在此帖子中,正则表达式Google表单我学习了如何使用正则表达式进行验证.

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.

现在,我不仅需要验证同一字段,而且还要验证最小值(120)和最大值(10000).

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.

正则表达式或google应用程序有可能吗?

Is this possible with regex or with google apps?

这里是实际的正则表达式,仅验证整数

Here is the actual regex which validates whole numbers only

[0-9]+

谢谢!

推荐答案

您可以使用Regex,但可能会更复杂一些:请参阅:

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:

  • 至少要执行以下操作:高级设置->数据验证->数字->在
  • 之间
  • 然后输入所需范围(以您的情况为准)120和10000).


这种验证可以防止用户输入非数字值.


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

这篇关于验证"Google表单"字段中的2个条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆