Why not adopt me?
This distribution is up for adoption!
If you're interested then please contact the PAUSE module admins via
email.
NAME
HTML::FormFu::JQueryValidation - Client-side JS constraints
SYNOPSIS
$form->roles('JQueryValidation');
In your TT template:
<!DOCTYPE HTML>
<html>
<body>
[% form %]
<script src="//js/jquery.min.js" />
<script src="//js/jquery.validate.min.js" />
<script>
$("#form").validate( [% form.jquery_validation_json %] );
</script>
</body>
</html>
DESCRIPTION
Experimental support for client-side constraints with JQuery Validation http://jqueryvalidation.org.
CONSTRAINTS
Adds constraints for the following elements:
Supports the following constraints on any element:
- HTML::FormFu::Constraint::Email
- HTML::FormFu::Constraint::Integer
- HTML::FormFu::Constraint::Length
- HTML::FormFu::Constraint::MaxLength
- HTML::FormFu::Constraint::MinLength
- HTML::FormFu::Constraint::MaxRange
- HTML::FormFu::Constraint::MinRange
- HTML::FormFu::Constraint::Number
- HTML::FormFu::Constraint::Range
- HTML::FormFu::Constraint::Required
METHODS
jquery_validation_profile
Returns a hash-ref with rules
and messages
keys.
jquery_validation_json
Returns jquery_validation_profile passed through "objToJson" in JSON::Any.
SEE ALSO
AUTHORS
Carl Franks
LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.