Closed OFark closed 3 years ago
Use ObjectGraphDataAnnotationsValidator instead of DataAnnotationsValidator
Ok, so ObjectGraphDataAnnotationsValidator does work as long as you use [ValidateComplexType] to tell Blazor to traverse. However, is there any way to get this to utilize HTML5 validation? So web pages highlight and point to invalid fields?
Thanks for contacting us. The Blazor validation doesn't integrate more with HTML5 validation as you describe above. If you'd like this to be a feature, please file a separate issue with detailed justification why it's important and what scenarios it'll be useful in. We'll keep it on our backlog then to see how community will like it.
Describe the bug
Blazor EditForm does not validate all items in the form
To Reproduce
See: #13345
This has been marked as resolved, but Blazor still isn't traversing Fields for DataAnnotation validation.
I'm using the very latest .Net 5 all updated, the project is only about 2 months old.
My EditForm model has a list of items, those items have bools and strings bound to checkboxes and input text boxes and none of them are being validated.