struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clayson, Jim" <>
Subject help please: Validator basic use
Date Thu, 17 Oct 2002 13:04:56 GMT
Hi I am attempting to use the date validation provided by the framework - I
am using struts1.1b2.

I think I must be missing something fairly fundamental but maybe someone
will be able to confirm what that is. The problem is when I enter garbage
into the form's date fields and submit them, I get no errors. How does one
usually display the errors when using the validator framework.

I have my validator-rules.xml and validation.xml config files in my
application's web-inf dir.

Their relevent contents are as follows:


      <validator name="date"

            function validateDate(form) {
	....... etc

                return true;


 and validation.xml:

      <form name="ReportForm">
         <field property="dateFrom" depends="date">
         	     <arg0 key="ReportForm.dateFrom"/>
         <field property="dateTo" depends="date">
         	     <arg0 key="ReportForm.dateTo"/>

I have my action's validate attribute set to "true".

Are the above setup correctly?


The information contained in or attached to this email is
intended only for the use of the individual or entity to
which it is addressed. If you are not the intended
recipient, or a person responsible for delivering it to the
intended recipient, you are not authorised to and must not
disclose, copy, distribute, or retain this message or any
part of it. It may contain information which is confidential
and/or covered by legal professional or other privilege (or
other rules or laws with similar effect in jurisdictions
outside England and Wales).

The views expressed in this email are not necessarily the
views of Centrica plc, and the company, its directors,
officers or employees make no representation or accept any
liability for its accuracy or completeness unless expressly
stated to the contrary.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message