runceel / ReactiveProperty

ReactiveProperty provides MVVM and asynchronous support features under Reactive Extensions. Target frameworks are .NET 6+, .NET Framework 4.7.2 and .NET Standard 2.0.
MIT License
903 stars 101 forks source link

Blazor Server validation does not work #460

Closed gmkado closed 10 months ago

gmkado commented 11 months ago

Am I doing something wrong?

I initially tried adding ReactivePropertiesValidator to my application but it wasn't working, so I cloned this repo and ran the BlazorServerApp sample to poke around and see how things worked.

First I got an error when trying to compile:

Error NU1605 : Warning As Error: Detected package downgrade: System.Reactive from 6.0.0 to 5.0.0

So I changed this line to 6.0.0 and it ran okay, but it does not correctly validate the name fields: image

Thanks in advance

runceel commented 11 months ago

@gmkado Thank you for asking.

It seems to be working correctly. Validation rules for FirstName and LastName properties are Required and StringLength(maximumLength: 10). 'a' and 'b' are correct values for those properties.

image

And I'm working for ReactiveProperty for .NET 8 Blazor. However, it's very tough to work with ReactivePropertyValidator for new Static SSR model. I have no idea for it now. If you are going to use it on Statis SSR model or WASM model, I recommend using another solution for validation.

gmkado commented 10 months ago

@runceel thanks for the response, I misunderstood that StringLength was a maximum, not a minimum