Dancer::Plugin::FormValidator.
Hi, I'm an developper. Perl was my favorite language. I like sa much perl for different reason. I think Dancer was a good choice to develop a web application. Dancer was light, is not close in a model, have a good documentation, good name, and auhtor was cool. I have writing my first plugin I got a choice very easy to begin, I think this a good idea. I'm not a good developper at the moment but I hope that will come with experience. My plugin use Data::FormValidator for validate user input. If error was present I return halt() with a message, else I return 0. You can see my plugin here in github http://github.com/hobbestigrou/Dancer-Plugin-FormValidator , if you have any advice or idea. -- \0/ Hobbestigrou site web: http://erakis.im
Hi I have writing my first plugin I got a choice very easy to begin, I
think this a good idea. I'm not a good developper at the moment but I hope that will come with experience.
My plugin use Data::FormValidator for validate user input. If error was present I return halt() with a message, else I return 0.
You can see my plugin here in github http://github.com/hobbestigrou/Dancer-Plugin-FormValidator , if you have any advice or idea.
Thank you for this module! I wanted something like that for some time but didn't had the time to work on this. I'll take a look at the code and see if i have some ideas or suggestions.
Hi, I look in yours plugin and look very interesive and I will try yours plugin, but I don't think if you use 'halt()' is good option. Better idea if you return undef if everything is OK or hashref in Error. In hasref will be name of fields and error in this field. It's better put errors to same form template and write error or test error in given error field such as: get '/contact/form' => sub { my $error = undef; if (params->{send}) { my $input_hash = { Name = $params->{name}; Subject = $params->{subject}; Body = $params->{body}; }; my $error = form_validator_error( 'profil_contact', $input_hash ); if ( ! $error ) { return template 'form_ok'; } } template 'form', {errors=> $error,.....}; }; template form: [% IF $errors %] put yours error HERE [% END %] <form action="/contact/form" method="get"> <input type="hiden" name="send" value="1"> <input type="text" name="body" value="[% params.body %]"> <input type="text" name="subject" value="[% params.subject %]"> ....... </form> -----------------------------------------------
------------ Původní zpráva ------------ Od: franck <franck@lumberjaph.net> Předmět: Re: [Dancer-users] Dancer::Plugin::FormValidator. Datum: 12.10.2010 09:31:37 ---------------------------------------- Hi
I have writing my first plugin I got a choice very easy to begin, I
think this a good idea. I'm not a good developper at the moment but I hope that will come with experience.
My plugin use Data::FormValidator for validate user input. If error was present I return halt() with a message, else I return 0.
You can see my plugin here in github http://github.com/hobbestigrou/Dancer-Plugin-FormValidator , if you have any advice or idea.
Thank you for this module! I wanted something like that for some time but didn't had the time to work on this. I'll take a look at the code and see if i have some ideas or suggestions.
Congratulations on a new module, and thank you for enriching the Dancer community!
participants (4)
-
franck -
igor.bujna@post.cz -
Natal Ngétal -
sawyer x