Validators are a feature of editable cell of spreadsheet or table and single field section. Validators allow you to set what value can be typed in this cell. When user types wrong value, cell will be highlighted and an error will be displayed. App instance won't be saved and won't go to the next state, until the user corrects the error.
In fact there are 6 types of validators:
1. Required:
(cell type: any except checkbox)
Cell displays an error, when it is empty.
Parameters:
- Error message (type: text)(optional parameter) - text, which will be shown as an error
2. Conditional:
(cell type: any)
Cell displays an error, when condition given in parameter is not met.
Parameters:
- Condition (type: logical) - condition, which must be met; condition can be any formula, which returns true or false, formula doesn't have to reference the cell with this validator
- Error message (type: text)(optional parameter) - text, which will be shown as an error
3. Range
(cell type: any except checkbox, attachment and link)
Cell displays an error, when value in it is not in range described in parameters
Parameters:
- Min (type: the same as cell) - minimum value that the value in cell must have
- Max (type: the same as cell) - maximum value that the value in cell must have
- Error message (type: text)(optional parameter) - text, which will be shown as an error
4. Email
(cell type: text, dropdown list, autocomplete)
Cell displays an error, when typed value is not an email.
Parameters:
- Error message (type: text)(optional parameter) - text, which will be shown as an error
5. Restrict to list
(cell type: dropdown list, autocomplete)
Cell displays an error, when value in cell does not exist on the specified list of items.
Parameters:
- Error message (type: text)(optional parameter) - text, which will be shown as an error
6. Regular expression
(cell type: text, dropdown list, autocomplete)
Cell displays an error, when value doesn't match regular expression given in parameters.
Parameters:
- Expression (type: text) - regular expression, which describes correct value in cell. Here - https://regexone.com you can learn more about it.
- Error message (type: text)(optional parameter) - text, which will be shown as an error
Examples of regular expressions:
Remarks:
You can use a few validators in one cell, even few validators with the same type. When Error message parameter is empty, default information dependent on the type of validator will be displayed as an error.
0 Comments