The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 0.23

  • remove syntax attribute
  • use constraints function from $_ in constraint function;
    • my $rule = [ title => [ sub { $_->blank($_[0]) || $_->regex($_[0], qr/[0-9]+/) } ] ];
  • add create_rule method and new rule syntax
    • my $rule = $vc->create_rule; $rule->require('id')->check( 'int' )->message('id should be integer'); $rule->require('name')->check( ['not_blank' => 'name is emtpy'], [{length => [1, 5]} => 'name is too long'] ); $rule->optional('age')->check( 'int' )->default(20);

Modules

HTML form Validation, easy and flexibly
Result of validation

Provides

in lib/Validator/Custom/Constraint.pm
in lib/Validator/Custom/Constraints.pm