Perfect! Thanks James. That's exactly what I was looking for. Doug
On Wed, 2003-06-04 at 14:16, James Turner wrote: > Check out the requiredif validation. It's even in the newbie FAQ now. > > James > > > -----Original Message----- > > From: Doug Bryant [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 04, 2003 11:35 AM > > To: Struts Users Mailing List > > Subject: validator: how to validate if either of two fields > > is present andvalid > > > > > > we have a form we are displaying to the user. depending on > > the permissions the user has, they are required to either > > fill out a "requiredDeliveryDate" or "daysAro" > > > > Depending on what permissions you have, you must fill out one > > or the other and you must fill in either a date or an integer > > value depending on the field. > > > > We are currently using validator for the rest of the app (1.1 rc1). > > > > How can we achive this validation using validator? > > > > Writing a custom validate method does not seem to be a good > > solution because you can only validate one field at a time. > > > > We thought about extending > > org.apache.struts.validator.DynaValidatorForm, overriding the > > validate method, validating everything we can using > > validator and coding the rest, but it seems far from ideal. > > > > Does anyone have any suggestions or has anyone ever run > > across this type of problems before. > > > > Thanks for any suggestions. > > > > Doug > > > > -- Doug Bryant ICF Consulting Software Engineer phone: 843.760.3635 fax: 843.207.5444 email: [EMAIL PROTECTED] [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]