X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FValidation.pm;h=4592a89adf213ebdb35f1fd717512a965a74d98f;hb=e5fabfae919050046b8e87a8ddc020cc8bde53cc;hp=b51c9c8fcbd5b8f9df40f34575dda70a127db4dc;hpb=701da8c4d6f0b78ffc015085aa410a6cacfcdb40;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Validation.pm b/lib/DBIx/Class/Validation.pm index b51c9c8..4592a89 100644 --- a/lib/DBIx/Class/Validation.pm +++ b/lib/DBIx/Class/Validation.pm @@ -95,14 +95,14 @@ And then somewhere else: auto => 1, ); -Calls validation_module(), validation_profile(), and validation_auto() if the corresponding +Calls validation_module(), validation_profile(), and validation_auto() if the corresponding argument is defined. =head2 validation_module __PACKAGE__->validation_module('Data::FormValidator'); -Sets the validation module to use. Any module that supports a check() method just like +Sets the validation module to use. Any module that supports a check() method just like Data::FormValidator's can be used here, such as FormValidator::Simple. Defaults to FormValidator::Simple. @@ -119,24 +119,24 @@ Sets the profile that will be passed to the validation module. __PACKAGE__->validation_auto( 1 ); -This flag, when enabled, causes any updates or inserts of the class +This flag, when enabled, causes any updates or inserts of the class to call validate() before actually executing. =head2 validate $obj->validate(); -Validates all the data in the object against the pre-defined validation -module and profile. If there is a problem then a hard error will be -thrown. If you put the validation in an eval you can capture whatever +Validates all the data in the object against the pre-defined validation +module and profile. If there is a problem then a hard error will be +thrown. If you put the validation in an eval you can capture whatever the module's check() method returned. =head2 auto_validate __PACKAGE__->auto_validate( 0 ); -Turns on and off auto-validation. This feature makes all UPDATEs and -INSERTs call the validate() method before doing anything. The default +Turns on and off auto-validation. This feature makes all UPDATEs and +INSERTs call the validate() method before doing anything. The default is for auto-validation to be on. Defaults to on.