extends 'HTML::FormHandler';
has_field "age" (
label => "Type",
required => 0,
type => 'Integer',
);
____________________________________________________________
package My::Handler;
my $form = My::Form->new;
if ($form->validated) {
# validate form
$form->process( params => $c->req->query_params );
my @errors = $form->errors;
alert("Error: $_") foreach @errors;
my $age = $form->field('age')->value;
$logger->info("User entered age $age");
# build page
$c->stash->{age} = $age;
}