no, validators do not typically handle "null" values. those are controlled by the required flag. the reason checkboxes are unique is that they have no "null" value, a null in the checkbox means "false"
-igor On Fri, Apr 1, 2011 at 11:57 AM, Matthew Pennington <m...@profounddecisions.co.uk> wrote: > On 01/04/2011 19:34, Igor Vaynberg wrote: >> >> that can be accomplished using a validator. > > Is that not true of all form components? > > Matt >> >> -igor >> >> >> On Fri, Apr 1, 2011 at 11:33 AM, Matthew Pennington >> <m...@profounddecisions.co.uk> wrote: >>>> >>>> 1. The current approach is correct, requiring a checkbox means >>>> requiring that it be checked. >>>> >>>> 2. A checkbox shouldn't be able to be required. You can't *not* >>>> provide a value (it's binary) for a checkbox, so therefore it always >>>> should satisfy the required requirement. >>> >>> (1) >>> >>> I can't think of any useful benefit to (2) but I *can* think of a very >>> useful benefit for (1) The classic "tick this box to indicate that you >>> have >>> read and agreed to sell us your soul EULA would be the obvious time to >>> use >>> a checkbox and setRequired(true) if it worked as per (1). >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org