Handel::Components::Validation - Column validation for schemas
package MySchema::Table; use strict; use warnings; use base qw/DBIx::Class/; __PACKAGE__->load_components('+Handel::Component::Validation'); __PACKAGE__->validation( module => 'FormValidator::Simple', profile => [ ... ], auto => 1 ); 1;
Handel::Components::Validation is a customized version of DBIx::Class::Validation for use in cart/order schemas.
There is no real reason to load this component into your schema table classes directly. If you set a profile using Handel::Storage->validation_profile, this component will be loaded into the appropriate schema source class automatically.
If validation fails, a Handel::Exception::Validation will be thrown containing the the result object returned from the validation module.
Validates the data using the specified validation module/profile. If validation succeeds, the result object from the validation module is returned. If validation fails, a Handel:Exception::Validation will be thrown.
Wraps DBIx::Class::Validation exceptions in Handel exceptions and rethrows. See "throw_exception" in DBIx::Class::Row for more information about throw_exception.
DBIx::Class::Validation, FormValidator::Simple
Christopher H. Laco CPAN ID: CLACO claco@chrislaco.com http://today.icantfocus.com/blog/
To install Handel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Handel
CPAN shell
perl -MCPAN -e shell install Handel
For more information on module installation, please visit the detailed CPAN module installation guide.