NAME

Apache::PageKit::FormValidator - Validates user input based on Apache::Request object

DESCRIPTION

This module is a wrapper to HTML::FormValidator. It validates the form data from the Apache::Request object contained in the Apache::PageKit object.

SYNOPSIS

$validator = Apache::PageKit::FormValidator->new( $input_profile );

my $ok = $validator->validate($pk);

if($ok){
  # get validated, filtered form data
  my $apr = $pk->{apr};
  $fdat = map { $_ => $apr->param($_) } $apr->param;
} else {
  # not valid, check to see error fields
  if($validator->is_error_field('name'));
  $pk->message('You filled your name incorrecty.');
}

SEE ALSO

Apache::PageKit, Apache::View, HTML::FormValidator, HTML::Template

AUTHOR

T.J. Mather (tjmather@anidea.com)

COPYRIGHT

Copyright (c) 2000, AnIdea Corporation. All rights Reserved. PageKit is a trademark of AnIdea Corporation.

LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Ricoh Source Code Public License for more details.

You can redistribute this module and/or modify it only under the terms of the Ricoh Source Code Public License.

You should have received a copy of the Ricoh Source Code Public License along with this program; if not, obtain one at http://www.pagekit.org/license