I'm using the Microsoft Validator Application Block with attributes to
assign validators to various fields in a class. It's pretty straightforward:
// public fields used for brevity
[StringLengthValidator(1,50)]
public string someValue;
[StringLengthValidator(1,50)]
public string someOtherValue;
[???????]
public string yetAnotherValue;
My question is, how would I assign a validator to "yetAnotherValue" ONLY IF
"someOtherValue" is not null? Is there a conditional operator that can point
to another field?
Validating individual fields is simple enough, I just don't know how to do a
conditional validation.
Thanks.