X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FCDBI%2FDFV.pm;h=eb2bf20668834329b18f692042fa03ae13c931f5;hb=c38178130074637da021d64e139696422496ab0e;hp=5c7a1273a39c0c57b0757ad89b82398068c70526;hpb=d4c604cd340f311044ce23c73c4321bf49553b36;p=maypole.git diff --git a/lib/Maypole/Model/CDBI/DFV.pm b/lib/Maypole/Model/CDBI/DFV.pm index 5c7a127..eb2bf20 100644 --- a/lib/Maypole/Model/CDBI/DFV.pm +++ b/lib/Maypole/Model/CDBI/DFV.pm @@ -96,6 +96,21 @@ sub adopt { } } +=head2 check_params + + Checks parameters against the DFV profile for the class, returns the results + of DFV's check. + + my $dfv_results = __PACKAGE__->check_params($r->params); + +=cut + +sub check_params { + my ($class,$params) = @_; + return Data::FormValidator->check($params, $class->dfv_profile); +} + + =head1 Action Methods Action methods are methods that are accessed through web (or other public) interface. @@ -125,7 +140,6 @@ sub do_edit : Exported { return; } - my $required_cols = $class->required_columns; my $errors; if ($obj) { ($obj,$errors) = $class->_do_update($r,$obj);