struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MichaƂ Postupalski <plas...@ncnet.pl>
Subject Re: Validator validates too early (was RE: Validator won't valida te single required field)
Date Fri, 24 Jan 2003 23:17:12 GMT
On 1/24/2003 11:49 PM, Wendy Smoak wrote:
>       /*only validate if the form has actually been submitted.
>       We can tell this by checking to see if the Submit
>       button is in the request
>       */
>       
>       if (request.getParameter("Submit") != null) {
>          return super.validate( mapping, request );
>       } else {
>         return null;
>       }

I You are using POST method for sending request (and probably yes) I 
would exchange Your code for this one:

if (request.getMethod().equals("POST")) {
   return super.validate( mapping, request );
} else {
  return null;
}


plastic




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message