| HTML-FormFu documentation | Contained in the HTML-FormFu distribution. |
HTML::FormFu::Constraint::Email - Email Address Constraint
Checks the input value is an email address according to the address
method of Email::Valid.
Is a sub-class of, and inherits methods from HTML::FormFu::Constraint
Carl Franks cfranks@cpan.org
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| HTML-FormFu documentation | Contained in the HTML-FormFu distribution. |
package HTML::FormFu::Constraint::Email; use Moose; extends 'HTML::FormFu::Constraint'; use Email::Valid; sub constrain_value { my ( $self, $value ) = @_; return 1 if !defined $value || $value eq ''; my $ok = Email::Valid->address( -address => $value ); return $ok; } __PACKAGE__->meta->make_immutable; 1; __END__