I have a CSLA object with two managed properties and a custom Attribute. The requirements is to have at least one property null.
CSLA
Attribute
In other words: If Property A is set to something and property B already has a value, then property A and B becomes invalid. Upon Blanking property B, property A should become valid and vise versa.
To solve this issue I called the Validator.ValidateProperty in the property setter to validate property A when B is set and vise versa.
Validator.ValidateProperty
The problem is that error provider is not updating. When Property A has a value and property gets updated, the error provider appears around the two boxes, which is perfectly fine. When blanking property A, the error provider goes away from txtBoxA and stays around txtBoxB even though I triggered the validation of property B after property A is set. Please note the second I try to modify Property B the error provider disappears. I look like the way I'm not invoking the validation correctly.
This issue is driving me insane. I'm not sure what I'm doing wrong.