WarUI

Blazor EditForm and DataAnnotations Validation

GRID-A02-F16P1beyond-baselinePlanned

Integrates inline cell and row editing with Blazor's EditContext. [Required], [Range] and custom ValidationAttributes on TItem drive the cell error state, and ValidationMessage works for grid edits. The model's existing validation rules are reused, with nothing duplicated in JS.

Planned. This page shows the specification from issue #178. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid of OrderLine items annotated with DataAnnotations, wrapped in an EditForm with a ValidationSummary.

Expected behavior

Invalid values mark the cell, keep the editor open and appear in the summary. Valid commits fire OnRowCommitted. Submit is blocked while errors exist.

Planned API surface

EditMode: Cell|RowEditContext integrationDataAnnotationsValidator supportOnRowValidating / OnRowCommitted EventCallbacksCellValidationState

Acceptance criteria

  • DataAnnotations attributes are evaluated in .NET, not reimplemented in JS (pending)
  • Cell error state and message are rendered and linked to the editor (pending)
  • IValidatableObject cross-field rules run on row commit (pending)
  • Validation round-trips on Server meet the documented latency budget (pending)