Am 27.02.2009 um 11:05 schrieb Christian Lackas:

Hi Everybody,

just working on a user detail form, where the user has to type in his
password to be able to store the data. The passwords are stored as a
salted hash (using Crypt::SaltedHash and Digest::SHA1) in the database.

My idea was to have this in my form.yml:

   - type: Password
     name: password_old
     label: Old password
     filters:
       - type: Callback
         callback: MyApp::Utils::hashpassword
     constraint:
       - type: Set
         message: Password does not match

Hi,

You can try to create a Transformer. This one is called after a constraint is checked.
See 
http://search.cpan.org/~cfranks/HTML-FormFu-0.03007/lib/HTML/FormFu.pm#FORM_LOGIC_AND_VALIDATION
for more information on how and when a filter, constraint, transformer etc. is called.

moritz

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

Reply via email to