How can I override the IsValid property?
I have a model that's validating as false. I have a custom ValidationAttribute on the model and I'd like to set the IsValid flag for the whole model under certain circumstances.
Is this possible?
How can I override the IsValid property?
I have a model that's validating as false. I have a custom ValidationAttribute on the model and I'd like to set the IsValid flag for the whole model under certain circumstances.
Is this possible?
You can implement IDataErrorInfo on your model and apply model-wide validation.
This page has some information about iplementing the IDataErrorInfo Interface, about 2/3 of the way down under the heading "mplementing the IDataErrorInfo Interface"