logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MooseX::Types::Email - Email address validation type constraints for Moose.

Acknowledgements

       Chris Nehren "<apeiron@cpan.org>" added support for validating email messages.

       Karen Etheridge "<ether@cpan.org>" added support for lists of email addresses and messages.

Author

       Tomas Doran (t0m) <bobtfish@bobtfish.net

Contributors

       •   Karen Etheridge <ether@cpan.org>

       •   Tomas Doran (t0m) <bobtfish@bobtfish.net>

       •   Alexander Hartmaier <abraxxa@cpan.org>

       •   Chris Nehren <apeiron@cpan.org>

       •   Gregory Oschwald <goschwald@maxmind.com>

Description

       Moose type constraints which uses Email::Valid and Email::Abstract to check for valid email addresses and
       messages.  Types that support both single items and an arrayref of items are available.

       Note that "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.

Name

       MooseX::Types::Email - Email address validation type constraints for Moose.

Origin

       Shamelessly extracted from Reaction::Types::Email.

See Also

       Moose::Util::TypeConstraints
       MooseX::Types
       Email::Valid
       Email::Abstract

Support

       Bugs         may        be        submitted        through        the        RT        bug        tracker
       <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Types-Email>                                (or
       bug-MooseX-Types-Email@rt.cpan.org <mailto:bug-MooseX-Types-Email@rt.cpan.org>).

       There    is    also    a    mailing    list    available    for    users   of   this   distribution,   at
       <http://lists.perl.org/list/moose.html>.

       There is also an irc channel available for users of this  distribution,  at  "#moose"  on  "irc.perl.org"
       <irc://irc.perl.org/#moose>.

Synopsis

           package MyClass;
           use Moose;
           use MooseX::Types::Email qw/EmailAddress EmailMessage EmailAddresses EmailMessages/;
           use namespace::autoclean;

           has email => ( isa => EmailAddress, required => 1, is => 'ro' );
           has message => ( isa => EmailMessage, required => 1, is => 'ro' );

           has emails => ( isa => EmailAddresses, required => 1, is => 'ro' );
           has messages => ( isa => EmailMessages, required => 1, is => 'ro' );

Version

       version 0.009

See Also