This Validator references a bit of code (validator_unique_url) that presumably calls the database to check to see if the value is unique. Would someone be able to show what this code would actually look like? I have the rest of the validator example from this thread.
Then in MyApp::Schema::ResultSet::Urls,

use base qw/MyApp::Schema::Base::ResultSet/;
sub validator_unique_url {
   my $value = shift;
   .... how do I get at the DB?
}
Also, in the following sub, what would be an example of a context? Would it be 'MyApp::Schema' or 'MyApp::Schema::TableName'?

   sub validate_value {
       my ( $self, $value, $params ) = @_;

       my $c = $self->form->stash->{context};

       return $c->model('DBIC::Urls')->validator_unique_url($value);
   }



_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to