Dave Cross: Still Munging Data With Perl: Online event - Mar 17 Learn more

NAME

Handel::Components::Validation - Column validation for schemas

SYNOPSIS

use strict;
use base qw/DBIx::Class/;
__PACKAGE__->load_components('+Handel::Component::Validation');
__PACKAGE__->validation(
module => 'FormValidator::Simple',
profile => [ ... ],
auto => 1
);
1;

DESCRIPTION

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.

throw_exception

Wraps DBIx::Class::Validation exceptions in Handel exceptions and rethrows. See "throw_exception" in DBIx::Class::Row for more information about throw_exception.

SEE ALSO

DBIx::Class::Validation, FormValidator::Simple

AUTHOR

Christopher H. Laco
CPAN ID: CLACO
claco@chrislaco.com