UI Validation Questions
-
I use INotifyDataErrorInfo as in this article[^]. This is a fine for validating individual textboxes. 1. How would you validate that a list has items in it? 2. I have 2 comboboxes with the same collection of items in it. How can I validate that they both have differt items selected?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
I use INotifyDataErrorInfo as in this article[^]. This is a fine for validating individual textboxes. 1. How would you validate that a list has items in it? 2. I have 2 comboboxes with the same collection of items in it. How can I validate that they both have differt items selected?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
Quote:
GetErrors
method returns anIEnumerable
that contains validation errors for the specified property (when thepropertyName
parameter isn’t equal tonull
or empty string) or for the entire entity (when thepropertyName
parameter is equal tonull
or empty string)If you want to validate multiple properties of your entity, you need to return the errors when the GetErrors method[^] is called with a
null
property name.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer