struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: FieldChecks.validateMinLengths()
Date Tue, 01 Jul 2003 14:22:16 GMT
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.

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:
For additional commands, e-mail:

View raw message