| HTML-Widget documentation | Contained in the HTML-Widget distribution. |
HTML::Widget::Constraint::Email - Email Constraint
my $c = $widget->constraint( 'Email', 'foo' );
Email Constraint.
Sebastian Riedel, sri@oook.de
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| HTML-Widget documentation | Contained in the HTML-Widget distribution. |
package HTML::Widget::Constraint::Email; use warnings; use strict; use base 'HTML::Widget::Constraint'; use Email::Valid;
sub validate { my ( $self, $value ) = @_; return 1 unless $value; return 0 unless Email::Valid->address( -address => $value ); return 1; }
1;