This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 when one or two sets of fields are required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 when one or two sets of fields are required" Watch "Struts 2 when one or two sets of fields are required" New topic
Author

Struts 2 when one or two sets of fields are required

Katie Doody
Ranch Hand

Joined: Nov 03, 2006
Posts: 90
I am working on validation and need to do the following logic:



What I am trying to do is say either lawPermEasement and permAcres must have values OR lawTempEasement and tempAcres must have values OR all four fields can have values.

I am having real problems with whether the validation should be written in the negative or the positive.
[ September 17, 2008: Message edited by: Katie Doody ]
Katie Doody
Ranch Hand

Joined: Nov 03, 2006
Posts: 90
I found the answer to my question. My syntax was wrong. This accomplishes what I need to do;


[ September 23, 2008: Message edited by: Katie Doody ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts 2 when one or two sets of fields are required
 
Similar Threads
Need help with Validation.xml
Struts 2 Validation
Multiple field validation in Struts2 Validation using validation.xml file
Struts 2 Integer Validation not working
Struts2 Regex Validation killing me, Please help