NAME
Apache::PageKit::Model - Form validation.
DESCRIPTION
This module contains a wrapper to HTML::FormValidator. It validates the form data from the Apache::Request object contained in the Apache::PageKit object.
SYNOPSIS
$model = Apache::PageKit::Model($pk);
my $ok = $model->validate_input($input_profile);
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($model->is_error_field('name'));
$pk->message('You filled your name incorrecty.');
}
SEE ALSO
Apache::PageKit, HTML::FormValidator
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