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

NAME

DBIx::Class::Valiant::ResultSet - Validation support for resultsets

SYNOPSIS

    package Example::Schema::ResultSet::Person;

    use base 'DBIx::Class::ResultSet';

    __PACKAGE__->load_components('Valiant::ResultSet');

See <example> directory in the distribution for a more complete example setup and application.

DESCRIPTION

A component that needs to be used on any result classes for which you want to add Valiant validations on. Its best to add this to your base and default resultset classes if you plan to use DBIx::Class::Valiant across all your result classes.

METHODS

This component adds the following methods to your resultset classes.

skip_validation (1|0)

    $schema->resultset('User')->skip_validation(1)->create(...

Turns off automatic validation on any creates / updates / etc going forward in this chain if arg is true. You may still manually run validations in the normal way as described in Valiant (via ->validate for example).

skip_validate

do_validate

Skip validations or reenable validations. This is just a wrapper on "skip_validation" which presets the enable or disable value.

  $schema->resultset('User')
    ->skip_validate
    ->create(\%user_args);

build

This is just a shortcut for "->new_result(+{})" and exists mostly to provide expected API for Valiant::HTML::FormBuilder.

AUTHOR

John Napiorkowski email:jjnapiork@cpan.org

SEE ALSO

Valiant, DBIx::Class, DBIx::Class::Valiant

AUTHOR

See Valiant.

COPYRIGHT & LICENSE

See Valiant.