Re: Validator and At Least 1 Checkbox Checked

2006-09-20 Thread Paul Benedict
Laurie, absolutely, use the required validation. I do that for my applications. Since he was specifically talking about length of an array, there is no such validation; but as long as a valid is present, it was submitted. Laurie Harper wrote: Can't you just use the 'required' validation rule?

Re: Validator and At Least 1 Checkbox Checked

2006-09-20 Thread Laurie Harper
Can't you just use the 'required' validation rule? Or possibly a validwhen with something like *this* != null and *tihs*.length >= 1? Admittedly I haven't tried either, though. L. Paul Benedict wrote: I've always wanted this feature myself. However, no such validation exists.. but if you writ

Re: Validator and At Least 1 Checkbox Checked

2006-09-19 Thread Paul Benedict
I've always wanted this feature myself. However, no such validation exists.. but if you write it, you could share it back to the Struts community. So you'll have to add this validation yourself by override the validate() method of your form, checking the property's length; if it is not null t

Validator and At Least 1 Checkbox Checked

2006-09-19 Thread Mississippi John Hurt
Can struts validator validate that at least one checkbox in a set is checked? I guess somehow it has to validate that a String[] array property of the form has size of 1 or more, but I dont know how.