MooseX::Types::Email - Email address validation type constraint for Moose.
package MyClass; use Moose; use MooseX::Types::Email qw/EmailAddress EmailMessage/; use namespace::autoclean; has email => ( isa => EmailAddress, required => 1, is => 'ro' ); has message => ( isa => EmailMessage, required => 1, is => 'ro' );
EmailMessage must be an object that can be passed to Email::Abstract. Currently, constraining strings is not supported due to the leniency of Email::Abstract.
Tomas Doran (t0m)
Shamelessly extracted from Reaction::Types::Email.
<firstname.lastname@example.org> added support for validing email messages.
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.