Hi Phil, Actually, the simplest way is to use a List with indexed properties, and make the field required:
@Validate(required=true) private List<String> inputs; /* getter and setter */ In your JSP, use a loop to generate your fields so that you end up with <s:text name="inputs[0]"/> <s:text name="inputs[1]"/> ... <s:text name="inputs[N]"/> Cheers, Freddy On Wed, 17 Feb 2010 12:44:54 +0100, "Simon Oxenvad Rasmussen" <[email protected]> said: > Hi Phil, > > The simplest would be to just create your own > > @ValidationMethod > Public void validateSomething() { > If (inputField1 != null && inputField2 == null) > > Etc... > } > Or you might be able to do this more elegant using the expressions on the > @Validation annotation. > > > > > SIMON OXENVAD RASMUSSEN > > > -----Oprindelig meddelelse----- > Fra: phillip darley [mailto:[email protected]] > Sendt: 17. februar 2010 12:39 > Til: Stripes Users List > Emne: [Stripes-users] Nested Validation Annotation: one or more fields > required > > Hi, > > I have a form with multiple inputs, the user must enter one or more > inputs. Is there a way in stripes validation to say 'at least one of > these nested fields are required'? > > Cheers, > Phil > > ---------------------------------------------------------------------------- > -- > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
