NAME

MooseX::Types::EmailAddress - Valid email address type constraint for Moose.

VERSION

This documentation refers to MooseX::Types::EmailAddress version 1.1.2

SYNOPSIS

package FooBar;
use Moose;
use MooseX::Types::EmailAddress qw/EmailAddress EmailAddressList/;
use namespace::autoclean;

has address  => ( isa => EmailAddress, required => 1, is => "ro" );

has addrlist => (
     traits    => ["Array"],
     is        => "ro",
     isa       => EmailAddressList,
     coerce    => 1,
     default   => sub { [] },
     handles   => {
        "addr_count" => "count",
     }
 );

DESCRIPTION

This module provides Moose type constraints for valid email addresses. There is support for a type which represents a single valid email address and a type which represents a list of valid email addresses. The validation is done using the Email::Valid module.

This module is similar to MooseX::Types::Email but deliberately focuses only on email addresses. This module also provides an additional type to handle lists of addresses.

DEPENDENCIES

This module requires MooseX::Types to build the Moose types. It uses Email::Valid to check if a string is a valid email address. It also uses Email::Address for parsing and splitting strings which might contain more than one address into a list.

SEE ALSO

Moose, Moose::Util::TypeConstraints, MooseX::Types::Email

PLATFORMS

This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.

ScientificLinux6

BUGS AND LIMITATIONS

If you find a bug please either email the author, or add the bug to cpan-RT http://rt.cpan.org.

AUTHOR

Stephen Quinney <squinney@inf.ed.ac.uk>

LICENSE AND COPYRIGHT

Copyright (C) 2012-2013 University of Edinburgh. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.