I have a textbox whose Text
property is bound to an integer property in the view model. There is an automatic validation by WPF if the text that is entered by the user is an integer. This functionality is good for me so that I don't need to build additional validation.
Now I have a button whose Command
property is bound to a command in the same view model and I want to have the CanExecute
method of that command return false if there are any validation errors.
Is there a possibility to know in the view model if there are any validation errors?