FormValidator::Simple

Validation with simple chains of constraints
Download

FormValidator::Simple Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Lyo Kato
  • Publisher web site:
  • http://search.cpan.org/~lyokato/

FormValidator::Simple Tags


FormValidator::Simple Description

Validation with simple chains of constraints FormValidator::Simple is a Perl module for validation with simple chains of constraints.SYNOPSIS my $query = CGI->new; $query->param( param1 => 'ABCD' ); $query->param( param2 => 12345 ); $query->param( mail1 => 'lyo.kato@gmail.com' ); $query->param( mail2 => 'lyo.kato@gmail.com' ); $query->param( year => 2005 ); $query->param( month => 11 ); $query->param( day => 27 ); my $result = FormValidator::Simple->check( $query => ], param2 => , mail1 => , mail2 => , { mails => } => , { date => } => , ] ); if ( $result->has_error ) { my $tt = Template->new({ INCLUDE_PATH => './tmpl' }); $tt->process('template.html', { result => $result }); }template example < p >Found Input Error< /p > < ul > < li >param1 is blank.< /li > < li >param1 is invalid.< /li > < li >param1 needs ascii code.< /li > < li >input into param1 with characters that's length should be between two and five. < /li > < /ul > example2 < ul > < li >invalid: - < /li > < /ul > This module provides you a sweet way of form data validation with simple constraints chains. You can write constraints on single line for each input data.This idea is based on Sledge::Plugin::Validator, and most of validation code is borrowed from this plugin.(Sledge is a MVC web application framework: http://sl.edge.jp )The result object this module returns behaves like Data::FormValidator::Results. Requirements: · Perl


FormValidator::Simple Related Software