HTML::Widget::JavaScript - Adds JavaScript validation to HTML::Widget


HTML-Widget-JavaScript documentation  | view source Contained in the HTML-Widget-JavaScript distribution.

Index


NAME

Top

HTML::Widget::JavaScript - Adds JavaScript validation to HTML::Widget

VERSION

Top

Version 0.02

UNMAINTAINED MODULE

Top

This module is unmaintained.

No future updates are planned at this time. You have been warned.

SYNOPSIS

Top

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.

METHODS

Top

See HTML::Widget.

$self->result( $query, $uploads )

$self->process( $query, $uploads )

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.

TODO

Top

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

AUTHOR

Top

Nilson Santos Figueiredo Júnior, <nilsonsfj at cpan.org>

BUGS

Top

Please report any bugs or feature requests directly to the author. If you ask nicely it will probably get fixed or implemented.

SUPPORT

Top

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

SEE ALSO

Top

HTML::Widget

COPYRIGHT & LICENSE

Top


HTML-Widget-JavaScript documentation  | view source Contained in the HTML-Widget-JavaScript distribution.