-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the problem this feature would solve
I tried the new MVVM Library and it suits my needs very well. I used the ObservableValidator to send messages to the user if something is wrong or missing. Unfortunately the validation will only apply if the value is set and actually changed. There might be usecases where the value did not change but needs to be validated again anyway.
Example: You have a number a=10 that may not exceed another number b=5. If now b changes to b=20 a=10 is now valid but will not be validated because it did not change.
Another example if if you want to validate the class right after creation and want to mark properties that still hold the default value of null
Describe the solution
The user can call ValidateProperty(string PropertyName) to validate a property or ValidateAll() to validate the entire class.
Describe alternatives you've considered
Set the value to something different and restore the old value then. But IMO this is not a good practise.
Additional context & Screenshots

The class on startup - It is not validated as the values were null at start up

The same view after typing a letter and reset it to null again. I want this view on start up