Provided by: libembperl-perl_2.5.0-12build1_amd64
Embperl::Form::Validate - Form validation with server- and client-side support.
This modules is developed to do form validation for you. It works on the server side by checking the posted form data and it generates client side script functions, to validate the form values, as far as possible, before they are send to the server, to avoid another server roundtrip. Also it has the best support for Embperl, it should also work outside of Embperl e.g. with CGI.pm or mod_perl. It can be extended by new validation rules for additional syntaxes (e.g. US zip codes, German Postleitzahlen, number plates, iso-3166 2-digit language or country codes, etc.) Each module has the ability to rely it's answer on parameters like e.g. the browser, which caused the request for or submitted the form. The module fully supports internationalisation. Any message can be provided in multiple languages and it makes use of Embperl's multilanguage support.
use Embperl::Form::Validate; my $epf = new Embperl::Form::Validate($rules, $form_id); $epf->add_rule('fnord', $fnord_rules); # validate the form values and returns error information, if any my $result = $epf -> validate ; # Does the form content validate? print 'Validate: ' . ($result?'no':'yes'); # validate the form values and reaturn all error messages, if any my $errors = $epf->validate_messages($fdat, $pref); # Get the code for a client-side form validation according to the # rules given to new: $epf -> get_script_code ;
See also Embperl.
Axel Beckert (email@example.com) Gerald Richter (richter at embperl dot org)