AppFuse's Spring MVC implementation ships with Commons Validator that has a "validwhen" validator you can use. You can read more about it in their documentation (I think):
http://jakarta.apache.org/commons/validator/ However, doing this logic with expressions in XML might be more difficult than doing the logic in Java. You can use Spring MVC's Validator interface to implement Java-based validation. Just changed the "validator" property to point to your Java class instead of beanValidator. http://www.springframework.org/docs/reference/validation.html Matt On 2/28/07, Gary White <[EMAIL PROTECTED]> wrote:
I'm using AppFuse 1.9.3/Spring MVC. I've developed a survey engine and am now trying to implement conditional validation based on user-defined settings. The scenario is that a user creates a survey and specifies via a checkbox whether or not an answer is required for each individual question. Validation would then be conditionally activated based upon these settings when other users take the survey. Multiple questions would be displayed on a form so activating/deactivating validation for the entire form is not an option; validation would have to be enabled/disabled on a per question basis. Questions can be of a variety of input types (i.e. text, checkbox, radio button etc). Both client and server-side validation is desired but I'll settle for either if necessary. Any ideas/suggestions? Thanks, Gary -- View this message in context: http://www.nabble.com/conditional-validation-tf3325234s2369.html#a9244405 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
