I have a simple view and viewmodel with the latter implementing IDdataErrorInfo and IValidationExceptionHandler. The view contains a combobox with its ItemsSource bound to an collection with SelectedValue bound to a property - validating on data errors and exceptions; updates on property changed and notifies on source updated.
I'm using data annotations and the property is "decorated" with Required as well as a Range attribute and I would upon executing the view have expected the combobox to display the error adorner and the message I've provided for the Required attribute. However, hovering over the adorner I notice the message is instead "Value "" could not be converted".
Do I have to check the selected value in the getter for the property and return a ValidationResult with my message if I find that no value has been selected? I thought just using the Required attribute would have done the trick but that doesn't seem to work for comboboxes?
Any help much appreciated.