RehanSaeed / rehansaeed.github.io

Muhammad Rehan Saeed's Blog
https://rehansaeed.com
30 stars 6 forks source link

[Comment] Model-View-ViewModel (MVVM) - Part 4 - INotifyDataErrorInfo #93

Open RehanSaeed opened 4 years ago

RehanSaeed commented 4 years ago

https://rehansaeed.com/model-view-viewmodel-mvvm-part4-inotifydataerrorinfo/

RehanSaeed commented 4 years ago

Muhammad Rehan Saeed Muhammad Rehan Saeed commented on 2019-12-30 11:19:51

Hi Rehan, I've been subscribed to your blog for a while and love it! I'm using ReactiveUI validation in a WPF project, and I was wondering if it's possible to keep the entities clean (I've only decorated them with data-annotations attributes or IValidatoableObject implementations), and perform all validation logic in the VM, all this while binding directly to the entities (i.e. exposing them as a whole via a property in the VM, not proxying the properties individually in the VM.

I'm not familiar with ReactiveUI validation. I prefer simple methods to attributes personally.

vicken78 commented 1 year ago

What about limiting to types like a string can only be numbers. verifying dates, decimal inputs, etc.