Hi Carl:

sorry for my poor English.
  I'm writing codes for register function. But I found no
proper place to put my validate function. 

I just want to use HTML::FormFu to validate whether a user name has
been in a table user using Catalyst::Controller::HTML::FormFu's attr
FormConfig('register.yml'). But I dont know how to put the validator
code to yml. 

Maybe I should put code to a custom module like
MyApp::Validator::User. But I don't know how to get $c in that
module. It seems like validator or constraint module only get two
arguments, $self and $value. 

I try to change the form after load configure. But I found before I got
$from from $c->stash, that form has been processed. 

Can you add a new method to give user a form that has been populated
by load_config_file but has not processed query? Then I can add code
to use any local variables like $c, or finish other complex work.

I should use other method like FormMethold, and write a
load_form function to add my validate code to the form. But I think it
is too inconvenient to load configure file.


-- 

Thanks & Regards

Chylli


_______________________________________________
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