You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Caine Lai <ca...@gmail.com> on 2007/05/08 00:57:30 UTC

Struts 2 StringLengthFieldValidator maxLength attr is a String!?

So what's up with the Struts 2 StringLengthFieldValidator's maxLength
property being a String?  This completely screws up my ability to define the
field length in an int constant.  Does anyone have a workaround for this?

Thanks.

Re: Struts 2 StringLengthFieldValidator maxLength attr is a String!?

Posted by Caine Lai <ca...@gmail.com>.
Yes, the Struts API is fine.

It's the struts annotations that specify a String value.  Since I'm using
annotations to set my validators, I have to use a String to specify field
length, which seems silly to me.

http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/validator/annotations/StringLengthFieldValidator.html#maxLength()

On 5/7/07, Dave Newton <ne...@yahoo.com> wrote:
>
> --- Caine Lai <ca...@gmail.com> wrote:
> > So what's up with the Struts 2
> > StringLengthFieldValidator's maxLength
> > property being a String?
>
> What?
>
>
> http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.html#setMaxLength(int)
>
> What version are you referring to?
>
> d.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Struts 2 StringLengthFieldValidator maxLength attr is a String!?

Posted by Dave Newton <ne...@yahoo.com>.
--- Caine Lai <ca...@gmail.com> wrote:
> So what's up with the Struts 2
> StringLengthFieldValidator's maxLength
> property being a String?  

What?

http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/validator/validators/StringLengthFieldValidator.html#setMaxLength(int)

What version are you referring to?

d.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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