File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Validator - 3 textboxes to one error
 
Similar Threads
Struts2 Datetime Picker focus is not set using javascript
Make fields required when one has a value.
Date validation in struts....
Struts Auto Validation Message in Different Locale Format
Bizarro date validation issue