Is Struts Validator 1.2 compatible with Struts 1.1?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mark_Thomas
Posted On:   Tuesday, September 20, 2005 11:20 AM

Hi,

We are looking to implement the Struts Validator 1.2 with Struts 1.1? Particularly we're looking to use the required when method.

Does anyone have any experience with this? Any known issues or problems combining the two?

Thanks

Re: Is Struts Validator 1.2 compatible with Struts 1.1?

Posted By:   alan_do  
Posted On:   Tuesday, September 20, 2005 06:53 PM

you need to update the validator-rules.xml file to use ActionMessage and ActionMessages instead of ActionErrors and ActionErrors. if you have other ActionError(s) in custom validation or elsewhere, you'll have to update those classes and methods. some constants have been moved to the Globals class and some validation utilities have also been moved. it shouldn't take you too long to figure it out.


as for 'validwhen' (not required when), it can be a bit annoying at first. take care to consider all conditions and test thoroughly. i haven't seen a 'requiredif' that could not be rewritten using 'validwhen' rule. so...go forth my friend. - alan

About | Sitemap | Contact