What is the relationship between EditForm, EditContext, and FieldIdentifier in the Blazor validation system?
Last updated
EditFormis the UI container: it creates or accepts anEditContext, cascades it to children, and handles submit.EditContextis the state engine: it tracks modified state and validation messages and raisesOnFieldChangedandOnValidationRequested.FieldIdentifieris a struct (model object + property name) used as the key forValidationMessageStoreentries andIsModified()queries.
- https://blazor-university.com/forms/editcontext-fieldidentifiers-and-fieldstate/
- https://learn.microsoft.com/en-us/aspnet/core/blazor/forms/validation?view=aspnetcore-10.0
- https://learn.microsoft.com/en-us/aspnet/core/blazor/forms/validation-advanced?view=aspnetcore-10.0
- https://learn.microsoft.com/en-us/aspnet/core/blazor/forms/binding?view=aspnetcore-10.0
- https://gist.github.com/ShaunCurtis/db35d594e7902cd64e912be924f8b506
- https://www.telerik.com/blogs/blazor-basics-advanced-blazor-form-validation