Clear all

How do I add custom validation to an editable report?


Topic starter

I'd like to perform validation on one or more columns in the report's grid before the user updates the rows. How do I add that?

Topic Tags
1 Answer
Topic starter

For ExtJS-based reports, you can use a report plugin which adds a custom validator to the grid's One.grid.GridErrorsPlugin instance. Here's a link to the documentation for the validator function.

define(function() {

MOD.ReportPlugin = {
  init: function (report) {
    report.on('gridcreated', function(_, grid) {
      report.gridErrors.validators.push(function(record) {
        // TODO
        return {
          message: 'Row-level error message'
            name: 'Site$Name', message: 'Field-level error message'

© 2020 One Network Enterprises. All rights reserved. Privacy Policy