Validation in ASP.NET MVC Gantt Component
18 Nov 20181 minute to read
Column validation
Column validation validates the editing and adding data and it display errors for invalid fields before saving data. This is effective in both inline and dialog editing.
Gantt uses Form Validator component for column validation. You can set validation rules by defining the validationRules in Columns. The value cannot be saved unless the validation rule get satisfied.
Custom validation
You can define your own custom validation rules for the specific columns by using callback function to it’s validation rule.
In the below demo, custom validation applied for TaskName column.
Dependency and resource grid validation
Validation rules can also be implemented for the dependency and resource grid in the add or edit dialog by employing the event ActionBegin.
Within the actionBegin event, validationRules can be configured for columns in the grid of the dependency and resource tabs using the requestType beforeOpenEditDialog or beforeOpenAddDialog.