You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt Raible <ma...@yahoo.com> on 2001/09/25 23:11:28 UTC
Validation Framework: validating field length
Our current UI framework does not allow Javascript for UI Validation, so we are
using the struts validation framework sans javascript.
So far, we have found that we are only able to validate "required" and "data
types." We would also like to validate "length" of a string and such, to make
sure the value can fit into the database column. Is there anyway/plans to do
this in the Validation Framework?
Thanks,
Matt
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Re: Validation Framework: validating field length
Posted by Matt Raible <ma...@yahoo.com>.
This will work perfectly - thanks!
Matt
--- David Winterfeldt <dw...@yahoo.com> wrote:
> I have plans to add a min and max length for
> convenience, but haven't had the time (even though
> they aren't a lot of work). Currently you can use
> regular expression to limit length.
>
> 5 letters
> ^\w{5}$
>
> 5 numbers
> ^\d{5}$
>
> At least 2, but not more than 5 letters
> ^\w{2,5}$
>
>
> David
>
> --- Matt Raible <ma...@yahoo.com> wrote:
> > Our current UI framework does not allow Javascript
> > for UI Validation, so we are
> > using the struts validation framework sans
> > javascript.
> >
> > So far, we have found that we are only able to
> > validate "required" and "data
> > types." We would also like to validate "length" of
> > a string and such, to make
> > sure the value can fit into the database column. Is
> > there anyway/plans to do
> > this in the Validation Framework?
> >
> > Thanks,
> >
> > Matt
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get email alerts & NEW webcam video instant
> > messaging with Yahoo! Messenger. http://im.yahoo.com
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger.
http://im.yahoo.com
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Re: Validation Framework: validating field length
Posted by David Winterfeldt <dw...@yahoo.com>.
I have plans to add a min and max length for
convenience, but haven't had the time (even though
they aren't a lot of work). Currently you can use
regular expression to limit length.
5 letters
^\w{5}$
5 numbers
^\d{5}$
At least 2, but not more than 5 letters
^\w{2,5}$
David
--- Matt Raible <ma...@yahoo.com> wrote:
> Our current UI framework does not allow Javascript
> for UI Validation, so we are
> using the struts validation framework sans
> javascript.
>
> So far, we have found that we are only able to
> validate "required" and "data
> types." We would also like to validate "length" of
> a string and such, to make
> sure the value can fit into the database column. Is
> there anyway/plans to do
> this in the Validation Framework?
>
> Thanks,
>
> Matt
>
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant
> messaging with Yahoo! Messenger. http://im.yahoo.com
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com