This content has been marked as final.
Show 1 reply
-
1. Re: Object Level Validation
matt.drees Oct 11, 2007 1:39 AM (in response to swd847)No, I don't think so. It'd be tough to do.
As I understand it, if the validate values phase fails, then the update models phase should be skipped. But @AssertTrue methods are only going to be useful if the model attributes have been updated. So you can't check @AssertTrue methods in the validate values phase.
With property-level validation, you can check whether a value is valid without actually setting the property, so normal Model Validation doesn't have this problem.