
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.
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.

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>

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:


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.