[html-formfu] password processing

Carl Franks fireartist at gmail.com
Tue Jan 26 22:27:31 GMT 2010


2010/1/26 Octavian Rasnita <orasnita at gmail.com>:
> Hi Carl,
>
> From: "Carl Franks" <fireartist at 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



More information about the HTML-FormFu mailing list