METHOD
EditContext.NotifyValidationStateChanged
Raises the validation-state change event after a custom validator updates its messages. It does not run validation or render a component on its own. Avoid reentering validation from that event. Requires the ASP.NET Core shared framework or matching reference assemblies.
Formal Syntax & Structure
csharp syntaxcsharp
context.NotifyValidationStateChanged()Working Example
Example Snippetcsharp
using System;using System.Linq;using System.Threading;using Microsoft.AspNetCore.Components;using Microsoft.AspNetCore.Components.Forms;using Microsoft.AspNetCore.SignalR;var context=new EditContext(new object()); int count=0; context.OnValidationStateChanged+=(_,_)=>count++; context.NotifyValidationStateChanged(); Console.WriteLine(count); // 1