HTML::Widget::JavaScript - Adds JavaScript validation to HTML::Widget
Version 0.02
This module is unmaintained.
No future updates are planned at this time. You have been warned.
This module adds JavaScript field validation for HTML::Widget objects.
When a JavaScript checked constraint fails, an alert box with the given error message (set by the message() constraint method) is displayed.
message()
Currently, these constraints are implemented in JavaScript: All, AllOrNone, Any, ASCII, Email (simplified), Equal, HTTP, In, Integer, Length, Printable, Range and String.
In other words, these constraints are missing: Date, DateTime, Time and Regex. Note that, although JavaScript support is missing, they will continue to work using server-side validation.
See HTML::Widget.
After finishing setting up the widget and all its elements, call either process() or result() to create an HTML::Widget::JavaScript::Result. If passed a $query it will run filters and validation on the parameters. The Result object can then be used to produce the HTML.
process()
result()
$query
Implement the missing constraints.
Maybe add support for altering the error displaying behaviour (e.g. instead of using alert(), maybe we could fill the error span with the error messages directly through JavaScript).
Nilson Santos Figueiredo Júnior, <nilsonsfj at cpan.org>
<nilsonsfj at cpan.org>
Please report any bugs or feature requests directly to the author. If you ask nicely it will probably get fixed or implemented.
You can find documentation for this module with the perldoc command.
perldoc HTML::Widget::JavaScript
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/HTML-Widget-JavaScript
CPAN Ratings
http://cpanratings.perl.org/d/HTML-Widget-JavaScript
Search CPAN
http://search.cpan.org/dist/HTML-Widget-JavaScript
HTML::Widget
Copyright 2006, 2009 Nilson Santos Figueiredo Júnior, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Júnior,'. Assuming CP1252
To install HTML::Widget::JavaScript, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Widget::JavaScript
CPAN shell
perl -MCPAN -e shell install HTML::Widget::JavaScript
For more information on module installation, please visit the detailed CPAN module installation guide.