Dreamescaper / BlazorBindings.Maui

MAUI Blazor Bindings - Build native and hybrid MAUI apps with Blazor
MIT License
242 stars 16 forks source link

Question: How is validation achieved? #132

Closed mrpmorris closed 1 year ago

mrpmorris commented 1 year ago

I don't seem to be able to use EditForm etc.

Dreamescaper commented 1 year ago

You're right, you can't use EditForm, as it is targeted specifically for web. It is possible to create an alternative though. There is a POC in this PR, but the code is really outdated there.

There is no built-in support, as I wasn't able to figure out a universal way to make it work with built-in and third-party elements, which already provide some validation mechanisms.

I'll try to built a sample demonstrating that soonish though.

Dreamescaper commented 1 year ago

I've added a small sample with an example how you can achieve that: https://github.com/Dreamescaper/BlazorBindings.Maui/blob/main/samples/ValidationsSample/LoginPage.razor