[Catalyst] HTML::Widget feedback

Alan Humphrey alan.humphrey at comcast.net
Wed Feb 1 01:29:21 CET 2006


I just started using HTML::Widget for data validation.  Feedback/request:

Request:

Can the Range constraint get a range method?  I'd like to do something like:

$c->widget->constraint('Range', 'Field')->range( 1, 4 );
or
$c->widget->constraint('Range', 'Field')->range(  {minimum=>1, maximum=> 4}
);


Maybe I'm not understanding something, but right now I'm doing this:

$c->widget->constraint('Range', 'Field')->minimum(1);
$c->widget->constraint('Range', 'Field')->maximum(4);

Which seems unnecessarily verbose, especially if you have several fields
that need differing range constraints.

Feedback:

Filter::TrimEdges throws these warnings for empty fields

Use of uninitialized value in substitution (s///) at
/usr/pkg/lib/perl5/site_perl/5.8.0/HTML/Widget/Filter/TrimEdges.pm line 27
Use of uninitialized value in substitution (s///) at
/usr/pkg/lib/perl5/site_perl/5.8.0/HTML/Widget/Filter/TrimEdges.pm line 28

Perhaps it should just return if @_ is undefined.


- Alan





More information about the Catalyst mailing list