Combining ValidationRule and MultiValueConverter

Aug 27, 2009 at 2:53 AM
Edited Aug 27, 2009 at 2:53 AM

I was hoping to combine my converter class with validation so that, if successful, the data only had to be converted once. My converter does data validation from a database, so I do not want to have to call into the database twice (once for a validation pass and once for a conversion).

I created:
public class FixNameDataTypeConverter : ValidationRule, IMultiValueConverter

I have gotten my multivalueconverter to work, so I know that it is solid. I have gotten the validation rule to fire. However, I suspect that my xaml is wrong because the textbox never turns red. Has anyone ever tried this? If so, what would the xaml look like?

THANKS SO MUCH!!!