博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vue校验表格数据_如何通过数据验证限制Google表格中的数据
阅读量:2506 次
发布时间:2019-05-11

本文共 3279 字,大约阅读时间需要 10 分钟。

vue校验表格数据

vue校验表格数据

Google Sheets Hero image.

If you use Google Sheets to , you can prevent people from typing the wrong data in your spreadsheet’s cells. Data validation stops users from inserting anything other than properly-formatted data within specific ranges. Here’s how to use it.

如果您使用Google表格可以防止人们在电子表格的单元格中输入错误的数据。 数据验证会阻止用户在特定范围内插入除格式正确的数据以外的任何内容。 这是使用方法。

如何在Google表格中使用数据验证 (How to Use Data Validation in Google Sheets)

Fire up your browser, head to the , open a spreadsheet, and highlight the range you want to restrict.

启动浏览器,转到 ,打开电子表格,然后突出显示要限制的范围。

Highlight all the cells to which you want to add some data validation.

Click “Data,” and then click “Data Validation.”

单击“数据”,然后单击“数据验证”。

Click Data, and then click Data Validation.

In the data validation window that opens, click the drop-down menu beside “Criteria.” Here, you can set a specific type of input to allow for the selected cells. For the row we’ve selected, we’re going to make sure people put in a four-digit number for the year a movie was released, so select the “Number” option. You can also select other criteria, such as text only, dates, a pre-defined list of options, items from the specified range, or your custom validation formula.

在打开的数据验证窗口中,点击“条件”旁边的下拉菜单。 在这里,您可以设置特定的输入类型以允许选择的单元格。 对于我们选择的行,我们将确保人们在放映电影的年份中输入四位数的数字,因此请选择“数字”选项。 您还可以选择其他条件,例如仅文本,日期,选项的预定义列表,指定范围内的项目或自定义验证公式。

Click the drop-down menu next to "Criteria" and select the form of validation you want to use.

Each option has its own values you need to specify for this feature accurately to validate the data typed into each cell. Since we only want the year a movie was released, we’re going to use the “Between” validation. Then, we’re configuring a minimum value of 1887—the first motion picture created—and a maximum of 2500, which should be sufficient for the needs of this spreadsheet.

每个选项都有其自己的值,您需要为此功能准确指定,以验证键入到每个单元格中的数据。 由于我们只希望电影上映的年份,因此我们将使用“ Between”验证。 然后,我们配置的最小值为1887(创建的第一张电影),最大值为2500,足以满足此电子表格的需求。

Click the type of validation you want to use, and then type the range.

Next, choose whether Sheets should show a warning message or completely reject anything typed and display an error message when the data is invalid.

接下来,选择Sheets应该显示警告消息还是完全拒绝键入的任何内容,并在数据无效时显示错误消息。

The warning message notifies the user the number must be between a specific range and keeps the invalid data in the cell with a red notification.

警告消息会通知用户该数字必须在特定范围内,并用红色通知将无效数据保留在单元格中。

Warning message when invalid data is typed.

If you select “Reject Input,” the user sees a pop-up window with a nondescript error message after he submits the invalid data and whatever he typed is also deleted.

如果您选择“拒绝输入”,则用户在提交无效数据并且键入的任何内容也会被删除后,会看到一个弹出窗口,显示不带描述性错误消息。

Error message displayed when invalid data is typed.

You can also reject any invalid input, but provide people with some feedback on the type of data required. Click “Reject Input,” click the checkbox for “Show Validation Help Text,” and then type a helpful warning message. Click “Save” to close the validation tool.

您也可以拒绝任何无效的输入,但是可以向人们提供有关所需数据类型的一些反馈。 单击“拒绝输入”,单击“显示验证帮助文本”的复选框,然后键入有用的警告消息。 单击“保存”以关闭验证工具。

Click "Reject Input," and then click "Show Validation Help Text." Type your preferred error message.

Now, when someone attempts to enter invalid data, she’s given a helpful message so that she can fix the error in the data.

现在,当某人尝试输入无效数据时,会收到一条有用的消息,以便她可以纠正数据中的错误。

Example of a helpful error message that tells users the type of data they need to submit for it to be validated.


Data validation is essential when you’re collecting information from people and want to ensure they type the proper info into your spreadsheet cells. It prevents anyone from submitting malformed data and can be used as a catchall if you’ve set up formulas or automation tasks that rely on that data.

当您从人们那里收集信息并希望确保他们在电子表格单元格中键入正确的信息时,数据验证至关重要。 它可以防止任何人提交格式错误的数据,并且如果您设置了依赖该数据的公式或自动化任务,则可以用作包罗万象的文件。

翻译自:

vue校验表格数据

转载地址:http://mczwd.baihongyu.com/

你可能感兴趣的文章
《算法导论 - 思考题》7-1 Hoare划分的正确性
查看>>
win64 Python下安装PIL出错解决2.7版本 (3.6版本可以使用)
查看>>
获取各种类型的节点
查看>>
表达式求值-201308081712.txt
查看>>
centos中安装tomcat6
查看>>
从Vue.js窥探前端行业
查看>>
学习进度
查看>>
poj3368 RMQ
查看>>
“此人不存在”
查看>>
github.com加速节点
查看>>
解密zend-PHP凤凰源码程序
查看>>
python3 序列分片记录
查看>>
Atitit.git的存储结构and 追踪
查看>>
atitit 读书与获取知识资料的attilax的总结.docx
查看>>
B站 React教程笔记day2(3)React-Redux
查看>>
找了一个api管理工具
查看>>
zt C++ list 类学习笔记
查看>>
关于select @@IDENTITY的初识
查看>>
适用于带文字 和图片的垂直居中方法
查看>>
Part 2 - Fundamentals(4-10)
查看>>