struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject Re: FieldChecks.validateMinLengths()
Date Tue, 01 Jul 2003 14:41:38 GMT
--- Adam Hardy <ahardy.struts@cyberspaceroad.com> wrote:
> Oh. I see. But the client-side validation does not behave this way.
> 
> I have just max and min length specified, and with javascript on, I 
> cannot submit if the field is blank.

Client and server checks should be the same in 1.1 final.  If you
generated the static javascript and stored it in a file, make sure you
regenerate it after upgrading to 1.1 final.

David

> 
> David Graham wrote:
> > This is actually a good thing :-).  Minlength will only fail if there
> is
> > some text in the control and it's less than the minimum length.  If
> you
> > want it to fail with no data you need to use the required validation. 
> By
> > separating these validations you can make a field optional and if the
> user
> > fills it in, it has to be more than minlength characters.
> > 
> > David
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Mime
View raw message