Flauschi
Blazor help needed. How can i Validate datalist entries in a child component
I have written a Blazor testapp that has an EditForm with a child component in the parent component.
The child component consists of an input with type search and a datalist.
A method returns a result from the list on input. The selection is returned to the parent via EventCallback using @focusout and can be saved in an object with the other inputs in the parent using Submit.
As soon as the validation is active, I would check the return value of the child component and set Validation = true with string.NotEmptyOrWhitespace(value) == false.
Can someone please tell me how I can implement this?
Enclosed is my demo code
4 replies