aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/Types/Email.pm
blob: 01660a3f938c45714b15786dfdef46068c11ff40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package Reaction::Types::Email;

use MooseX::Types
    -declare => [qw/EmailAddress/];

use Reaction::Types::Core 'NonEmptySimpleStr';
use Email::Valid;

subtype EmailAddress,
  as NonEmptySimpleStr,
  where { Email::Valid->address($_) },
  message { "Must be a valid e-mail address" };

1;

=head1 NAME

Reaction::Types::Email

=head1 DESCRIPTION

=over 

=item * EmailAddress

=back

=head1 SEE ALSO

=over 

=item * L<Reaction::Types::Core>

=back

=head1 AUTHORS

See L<Reaction::Class> for authors.

=head1 LICENSE

See L<Reaction::Class> for the license.

=cut