API REFERENCE
cellValidationFailed
Emitted when validation fails. Use the target cell, input, and message to guide corrections.
What does this API do?
Emitted when validation fails. Use the target cell, input, and message to guide corrections.
Exact input and result types
cellValidationFailed: { rowIndex: number; field: string; value: unknown; message: string }Usage flow
Subscribe with grid.addEventListener('cellValidationFailed', handler). The result is in event.detail, and event names are case-sensitive. Remove subscriptions when disposing of the view.
const controller = new AbortController();
grid.addEventListener('cellValidationFailed', event => {
console.log(event.detail);
}, { signal: controller.signal });
// On view disposal: controller.abort();Feature explanations and examples
- Data validation
Use declarative rules to check required values, numeric ranges, string formats, and custom conditions. The default mode may only mark invalid values, so explicitly set invalidEditMode to block saving when required.