Gundersen, Richard wrote:
Hi
I'm using the VisitorFieldValidator (annotations) to push validation
over to my model object in my Action.
However, I want the validation rules in my model object to work
differently depending on which Action method is being called.
What's the best way of doing this please?
I don't think you can in that scenario. It might be possible to combine
VisitorFieldValidator annotations with action/method specific rules (via
annotation or XML), in which case you could set up your model
validations to enforce invariants (e.g. required validation for
properties that are always required, but not for those that are only
required with certain methods) and use action or action/method level
validations for the variant requirements. I haven't tried this, though,
so unless someone who has can offer some advice, you'll have to
experiment a bit to see what works.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]