Start a conversation

Validate grid field values

Calculation fields can be used to validate values in the grid field.


For example, this template validates the values entered in the first and second columns of the first row.

var obj = JSON.parse('{grid_variable_name}');

if (Object.values(obj[0])[0] == 1 && Object.values(obj[0])[1] == 1) {
    'The values are correct!';
} else {
    'The values are not correct!';
}


Use if/else logic to render various data validation messages.


Use if/else logic to output a number and add data validation to a calculation to display 'Warning' messages (like the one below) and other types of data validation messages. 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Castor Support Team

  2. Posted