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 the t/dbic tests in the distribution for more complete example setups.
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.
contains ($row)
Returns true if the resultset contains a row with the same primary key values as the given row (rows marked as removed are not considered). Used by the nested validation code and handy in tests.
SEE ALSO
Valiant, DBIx::Class, DBIx::Class::Valiant
AUTHOR
John Napiorkowski email:jjnapiork@cpan.org
COPYRIGHT & LICENSE
See Valiant.