2010/1/26 Octavian Rasnita <orasn...@gmail.com>: > Hi Carl, > > From: "Carl Franks" <fireart...@gmail.com> >> >> This is just a minor edit of HTML::FormFu::Transformer::Callback... >> >> package MyApp::MyValidator; >> >> use strict; >> use base 'HTML::FormFu::Validator'; > > Shouldn't extend HTML::FormFu::Transformer? > >> sub validate_value { > > Does it use validate_value just like the validator does? My main problem was > that I don't know what subroutine I need to override, and In > HTML::FormFu::Transformer::Callback I have seen just a transformer() method. > > This code doesn't look similar with the one in > HTML::FormFu::Transformer::Callback. > > Am I missing something?
No, sorry - this was a result of me trying to make sense, while being quite unwell :) In short - just copy HTML/FormFu/Transformer/Callback.pm remove the mk_item_accessors() line, unless you need to create slots to store config/runtime values, and replace the body of the transformer() method with whatever you need, ensuring you return the transformed value. You can access the form object via $sellf->form() Cheers, Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu