The moose likes Struts and the fly likes struts validation for two months and years 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 validation for two months and years" Watch "struts validation for two months and years" New topic

struts validation for two months and years

harsha addala

Joined: Oct 09, 2006
Posts: 3
I have problem with validations using struts. My application contains two text boxes of years and months and i require to validate them using validator.xml. The problem is , whenever i am validating the two text boxes, two error messages are displaying but i require to display only one error message for both the fields. Can anyone help me regarding this issue.
if possible post the required code.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

We have a whole forum devoted to Struts, further down the front page of the Saloon; I will move this there for you.

[Jess in Action][AskingGoodQuestions]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm afraid this isn't possible with the "out of the box" validators provided by Struts and the Apache validation framework. You will have to create a custom validation rule. See the heading "Pluggable Validators" in this link for more information on how to do that.

Consultant, Sima Solutions
I agree. Here's the link: http://aspose.com/file-tools
subject: struts validation for two months and years
Similar Threads
basic doubt
Auto tabbing among text fields created with logic:iterate
Help needed in javascript coding
displaying errors by using struts validation framework
Struts 2 Select list overlaps Coolmenus issue in IE 6