Closed ApocDev closed 4 years ago
I'm currently investigating integrating validation into MatTextField
. I have it mostly working but it's a bit of a mess right now. The approach I would like to take is to be able to derive from MatTextField
and add the validation functionality instead of modifying MatTextField
directly.
I'm currently investigating integrating validation into
MatTextField
. I have it mostly working but it's a bit of a mess right now. The approach I would like to take is to be able to derive fromMatTextField
and add the validation functionality instead of modifyingMatTextField
directly.
Agreed. I wound up copying MatTextField and making far too many changes just to enable validation. (MatBlazor isn't very extensible in that respect)
Optionally, MatTextField could just use the InputText and InputTextArea controls to handle it without most of the fuss.
I added support for validation for MatTextField
in a branch in my repository found at https://github.com/jorgy343/MatBlazor/tree/ex-TextField-Validation. It only supports strings but adding arbitrary types won't be hard.
I've started work in PR #178 to address this, if folks want to review and provide feedback.
Hello! This is now possible to do in MatBlazor. See example here:
https://www.matblazor.com/EditContext
Closing issue.
There is currently no support whatsoever for EditContext (via EditForm https://docs.microsoft.com/en-us/aspnet/core/blazor/forms-validation?view=aspnetcore-3.0)
All of the input-based controls should support EditContext so we can leverage built-in client-side validation.