|
Currently, we have the idea that you put an attribute on a property:
[RequiredIf("PropertyName", true)]
Wondering if, using reflection, we can say something like:
[RequiredIf("PropertyName", true, ObjectProperty="IsActive")]
or similar to be able to represent object validation...
Or
[RequiredIf("PropertyName.IsActive", true)]
and then parse the "PropertyName.IsActive" to get the parts we need to reflect against the sub objects to get to the property we really want to validate... this won't affect the client-side, since most of the time, what we are doing there is binding the
Values properties of Lists to the Ids of the lookups.
Just a thought...
|