The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Dancer::Plugin::FormValidator - easy validates user input (usually from an HTML form) based on input profile for Dancer applications.

SYNOPSIS

    use Dancer;
    use Dancer::Plugin::FormValidator;

    get '/contact/form' => sub {
        my $input_hash = {
            Name    = $params->{name};
            Subject = $params->{subject};
            Body    = $params->{body};
        };

        my $error = form_validator_error( 'profil_contact', $input_hash );

        if ( ! $error ) {
            #the user provided complete and validates
            # data it's cool to proceed
        }
    };
    
    dance;

DESCRIPTION

Provides an easy validates user input based on input profile (Data::FormValidator) keyword within your Dancer application.

CONFIGURATION

     plugins:
         FormValidator:
             profil_file: '/path/to/profiles.pl'
             msg: 
                 single: 'Missing field'
                 several: 'Missing fields'

AUTHOR

Natal Ngétal, <hobbestigrou@erakis.im>

CONTRIBUTING

This module is developed on Github at:

http://github.com/hobbestigrou/Dancer-Plugin-FormValidator

Feel free to fork the repo and submit pull requests

ACKNOWLEDGEMENTS

Alexis Sukrieh and Franck Cuny

BUGS

Please report any bugs or feature requests in github.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Dancer::Plugin::FormValidator

LICENSE AND COPYRIGHT

Copyright 2010 Natal Ngétal.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

SEE ALSO

Dancer Data::FormValidator

1 POD Error

The following errors were encountered while parsing the POD:

Around line 85:

Non-ASCII character seen before =encoding in 'Ngétal,'. Assuming UTF-8