Use validateForm to provide data form-level behavior that is launched when users click Save. With default Planning behavior, when users click Save on data forms, the validateForm function submits the grid. For example, you can calculate a variance between budget and actuals by comparing values in two columns, displaying an alert when users click Save if the variance is too high.
SampleValidateData.js includes an example that executes additional validation when users click Save. The values entered for the current year tare compared to last year’s values. If the current year values are more than 10% larger than previous year values, a message displays.