ValidationErrors
Description
A ValidationErrors is an interface that exposes all the validation errors currently found on a dataItem.
Properties
|
Property |
Type |
Description |
|---|---|---|
|
dataItem |
The |
|
|
fieldErrors |
A collection of |
Example
The DataGrid.getValidationErrors function returns all the errors in the dataGrid.
const errors = datagrid.getValidationErrors();
The result could look like this, an array of ValidationErrors:
dataItem:
- “The
dataItemcontaining error(s)”
fieldErrors:
- “FirstName”: “The First name is required”
- “LastName”: “The last name should start with B”
Where the dataItem property contains the dataItem that has error(s), and the fieldErrors property contains the ColumnDefinition.field(s) where errors are present, and their errorMessage, for a specific dataItem.
Need help? Contact us!