[Catalyst] html-widget suggestion, or too much DWIM?
Carl Franks
fireartist at gmail.com
Mon Mar 13 11:43:01 CET 2006
I've got a couple ideas for 'enhancing' the Select element, but I'm
not sure whether it's in line with most people's expectations.
I suggest that each Select element should automatically get an 'In'
constraint added, containing each of the possible values from the
'options' list.
e.g. this:
$w->element( 'Select', 'foo' )->options( 1 => 'monday', 2 => 'tuesday' );
should implicitly be the same as:
my $s = $w->element( 'Select', 'foo' )->options( 1 => 'monday', 2 =>
'tuesday' );
$s->constraint( 'In', 'foo')->in( 1, 2 );
I imagine this would be applicable for the radio and radiogroup elements, too.
I also suggest that when validating form input, multiple values for a
Select element should be an error unless the 'multiple' attribute is
set.
(I'm adding support and tests for the 'multiple' attribute at the moment)
Any nay-sayers on the above?
Cheers,
Carl
More information about the Catalyst
mailing list