CGI::Builder::DFVCheck is a Perl module for CGI::Builder and Data::FormValidator integration.
SYNOPSIS
use CGI::Builder
qw| CGI::Builder::DFVCheck
|;
$s->dfv_check(%form_profile)
|| return $s->switch_to('myOtherPage');
# if there is any error
# $s->page_error is automatically set
# to the $result->msgs HASH ref
# $s->dfv_results is always set to the results object
$results = $s->dfv_results
CGI::Builder Example
package My::WebApp ;
use CGI::Builder
qw| CGI::Builder::DFVCheck
|;
sub SH_myPage
{
my $s = shift ;
$s->dfv_check({ required => 'email' })
|| $s->switch_to('myOtherPage');
}
# do something with page_error
sub OH_pre_page {
my $s = shift ;
my $E = $s->page_error ;
while ( my($field, $err) = each %$E ) {
$s->page_content .= "$field field has this problem: $errn"
}
}
Product's homepage
Requirements:
· Perl