I need to check if data typed in a inputtext is valid, and if it is, then execute a method.
(Validation by a DataAnnotation
).
I tried in the OnFieldChanged
event of EditForm
but this one executes before validation.
How could I do this?
I need to check if data typed in a inputtext is valid, and if it is, then execute a method.
(Validation by a DataAnnotation
).
I tried in the OnFieldChanged
event of EditForm
but this one executes before validation.
How could I do this?
Copyright © 2021 Jogjafile Inc.
The parameter OnValidSubmit in EditForm can do this. Here is an example:
MyModel.cs
MyPage.razor
Invalid submit:
Valid submit: