Class GridValidationBuilder Stay organized with collections Save and categorize content based on your preferences.
Page Summary
GridValidationBuilder is a DataValidationBuilder for a GridValidation in Google Apps Script forms.
It can be used to set validation rules for grid items, such as requiring a limit of one response per column.
The
requireLimitOneResponsePerColumn()method is available to enforce this rule.
A DataValidationBuilder for aGrid.
// Add a grid item to a form and require one response per column.constform=FormApp.create('My Form');constgridItem=form.addGridItem();gridItem.setTitle('Rate your interests').setRows(['Cars','Computers','Celebrities']).setColumns(['Boring','So-so','Interesting']);constgridValidation=FormApp.createGridValidation().setHelpText('Select one item per column.').requireLimitOneResponsePerColumn().build();gridItem.setValidation(gridValidation);
Methods
| Method | Return type | Brief description |
|---|---|---|
require | Grid | Requires limit of one response per column for a grid item. |
Detailed documentation
requireLimitOneResponsePerColumn()
Requires limit of one response per column for a grid item.
Return
Grid — this validation builder, for chaining
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.