FormValidator::Lite::Constraint::Default - default constraint rules
This module provides default constraint rules for FormValidator::Lite.
The parameter is true value or not.
Synonym of NOT_NULL.
The parameter looks like a integer? i.e. It matches /^[+\-]?[0-9]+$/?
The parameter looks like a unsigned integer? i.e. It matches /^[0-9]+$/?
$_ =~ /^[\x21-\x7E]+$/
The parameter is just ASCII?
$validator->check( {mails => [qw/mail1 mail2/]} => ['DUPLICATION'] );
The two parameters have same value?
Synonym of DUPLICATION.
$validator->check( name => [[qw/LENGTH 5 20/]], password => [[qw/LENGTH 5/]], );
Check the length of data. First argument means $minumum value, second argument is $max. $max is optional.
$validator->check( name => [[REGEXP => qr/^[0-9]$/]], );
Check regexp matches parameter or not.
Synonym of REGEX.
$validator->check( sex => [[CHOICE => qw/male female/]] );
The parameter is one of choice or not.
To install FormValidator::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FormValidator::Lite
CPAN shell
perl -MCPAN -e shell install FormValidator::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.