Is there any way to clear the error for a specific field when using using Blazor validation ?
I tried something like the following, but it does not clear the error message :
MyEditContext.MarkAsUnmodified(MyEditContext.Field("Filename"));
Is there any way to clear the error for a specific field when using using Blazor validation ?
I tried something like the following, but it does not clear the error message :
MyEditContext.MarkAsUnmodified(MyEditContext.Field("Filename"));
In case anyone else is looking for the same thing, you can do the following and it will clear the existing error message for a particular field :
MyEditContext.NotifyFieldChanged(MyEditContext.Field("MyFieldName"));
maybe someone else will need it.
For clear all error create new EditContext:
1)Dont't use in form: EditForm Model="@LoginModel"
2)Use: EditForm EditContext="editContext"
3)For clear all error create new EditContext:
protected void CreateNewLoginModel()
{
LoginModel = new();
editContext = new EditContext(LoginModel);
}