aspose file tools*
The moose likes Struts and the fly likes Struts Validator framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Validator framework" Watch "Struts Validator framework" New topic
Author

Struts Validator framework

Udaya Raj
Greenhorn

Joined: Nov 01, 2002
Posts: 26
Hi,

I have a form which has the date feild to be validated

<CODE>
<form name="formname">
.
.
<form-field property="dob" depends="date,dateRange">
<msg name="dateRange" key="errors.field.range3" />
</form>


</form>

I like to give different error message for failure in date and dateRange failure. We have a custom validator where we have implemented the validateDate and validateDateRange methods. There we get the error message Resources.getActionError(request,va, field)); I like to know how to get different messages.


IBM Certified WebSphere 4.0 Specialist<br />IBM Certified in OOAD and UML
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

You specify the error message in the "msg" attribute of the validator tag in the validator-rules.xml.


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Validator framework