struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Lentz <Eric.Le...@sherwin.com>
Subject Re: Struts2 validation on List of String data
Date Mon, 02 May 2011 11:51:57 GMT
> String[]  names;
>// OR
>
>ArrayList names;
>}

>i want to validate RequiredStringValidator  validator on these names. 

I don't think the standard validations deal with arrays. Probably your 
best bet is to override validate() and validate on your own. See:

http://struts.apache.org/2.1.6/struts2-core/apidocs/com/opensymphony/xwork2/Validateable.html
http://struts.apache.org/2.1.6/struts2-core/apidocs/com/opensymphony/xwork2/ValidationAware.html
http://struts.apache.org/2.1.6/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html

(which implements those interfaces)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message