Skip to content

Instantly share code, notes, and snippets.

@lestrrat
Created May 28, 2009 14:53
Show Gist options
  • Save lestrrat/119357 to your computer and use it in GitHub Desktop.
Save lestrrat/119357 to your computer and use it in GitHub Desktop.
use strict;
use HTML::FormHandler;
my $form = HTML::FormHandler->new(
field_list => {
fields => [
foo => { type => 'Text', required => 1 }
]
}
);
if (! $form->process( params => { bar => 1 } )) {
foreach my $field ($form->error_fields) {
foreach my $error ($field->errors) {
warn $error;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment