You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey everyone,
I am trying to implement Blazored.FluentValidation with a custom implementation of MVVM pattern in Blazor WASM, in which my EditContext.Model is actually my ViewModel. My ViewModels contain sometimes 1, sometimes multiple different Model properties.
I got it working by modifying your code so that [FluentValidationsValidator] class includes an object property [Parameter] which I send down the line to ValidateModel() method and use instead of EditContext.Model.
Is there a better way to achieve this? Ideally I'd like to use this library with no internal modifications.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey everyone,
I am trying to implement Blazored.FluentValidation with a custom implementation of MVVM pattern in Blazor WASM, in which my EditContext.Model is actually my ViewModel. My ViewModels contain sometimes 1, sometimes multiple different Model properties.
I got it working by modifying your code so that [FluentValidationsValidator] class includes an object property [Parameter] which I send down the line to ValidateModel() method and use instead of EditContext.Model.
Is there a better way to achieve this? Ideally I'd like to use this library with no internal modifications.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions