[html-formfu] Re: Validation callback
Dermot
paikkos at googlemail.com
Thu Mar 5 14:25:29 GMT 2009
2009/3/5 Carl Franks <fireartist at gmail.com>:
> 2009/3/5 Dan Dascalescu <ddascalescu+formfu at gmail.com>:
>> Dermot <paikkos <at> googlemail.com> writes:
>>
>>> Your suggestion works thought so thanx although I am curious to know
>>> how to implement a callback.
>>
>> I think this is related to
>> http://thread.gmane.org/gmane.comp.lang.perl.modules.html-formfu.general/1778
>
> I'm not sure that it is.
> In this case, the callback is defined in the config file - which is
> loaded before the cat-controller calls process():
>
> validators:
> - type: Callback
> callback: "MyApp::Controller::Submissions::user_validator"
>
> Dermot, can you post the code where you're actually using the form?
> (for example, the cat-controller action method)
>
> Carl
Hi Carl
The original post is here:
http://lists.scsys.co.uk/pipermail/html-formfu/2009-January/001673.html
The actual validation check I wanted was to ensure that there were no
duplicate user-names. Of course I should have a DB UNIQUE on that
field! But is was more the implemenation of callback because my
efforts bore no fruit.
Dp.
More information about the HTML-FormFu
mailing list