This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts Validator - 3 textboxes to one error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Validator - 3 textboxes to one error" Watch "Struts Validator - 3 textboxes to one error" New topic
Author

Struts Validator - 3 textboxes to one error

Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Our application has inputs for a date and the date is required.
The format is 3 textboxes with slashes between the boxes:
<textboxMM>/<textboxdd>/<textboxYYYY>
The date is required. Here's the problem: if any combination of textboxes is left blank we need 1 error to display. If all are blank we do not want 3 errors.
We'll also need to verify if the date is valid, but I think that solving the "required" issue is solved will take care of other problems of fields that depend on one another. :roll:
I am currently reading on Interrelated fields [Husted pg 397] but having trouble piecing the logic together for what I need.


A good workman is known by his tools.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Never mind! I got what I wanted, despite the deprecation AND errata of the code in the book. :roll:
 
Have you checked out Aspose?
 
subject: Struts Validator - 3 textboxes to one error
 
It's not a secret anymore!