vue校验表格数据_如何通过数据验证限制Google表格中的数据

vue

vue校验表格数据

If you use Google Sheets to collaborate with others, 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 Google Sheets homepage, open a spreadsheet, and highlight the range you want to restrict.

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

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.

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

RELATED: How to Protect Cells From Editing in Google Sheets

相关: 如何保护单元格免受Google表格中的编辑的影响

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,足以满足此电子表格的需求。

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.

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

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.

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

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.

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

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

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

RELATED: How to See Recent Changes to Your Google Docs, Sheets, or Slides File

相关文章: 如何查看对Google文档,表格或幻灯片文件的最新更改



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.

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

  • › How to Quickly Scroll Through Home Screen Pages on iPhone and iPad

    › 如何在iPhone和iPad上快速滚动浏览主屏幕页面

  • › How to Play Android 11’s Hidden Easter Egg Game

    › 如何玩Android 11的隐藏复活节彩蛋游戏

  • › How to Move a Window to Another Virtual Desktop on Windows 10

    › 如何在Windows 10上将窗口移动到另一个虚拟桌面

  • › How to Replicate the iOS 14 App Library on Android

    › 如何在Android上复制iOS 14应用程序库

  • › What’s the Deal with Google Home and Nest? Is There a Difference?

    › 与Google Home and Nest有什么关系? 有区别吗?

翻译自: https://www.howtogeek.com/428919/how-to-restrict-data-input-in-google-sheets-with-data-validation/

vue校验表格数据

以上是 vue校验表格数据_如何通过数据验证限制Google表格中的数据 的全部内容, 来源链接: utcz.com/z/375064.html

回到顶部