completely new way of handling action prototypes for actions in CRUD that is much...
[catagits/Reaction.git] / lib / Reaction / Types / Email.pm
1 package Reaction::Types::Email;
2
3 use MooseX::Types
4     -declare => [qw/EmailAddress/];
5
6 use Reaction::Types::Core 'NonEmptySimpleStr';
7 use Email::Valid;
8
9 subtype EmailAddress,
10   as NonEmptySimpleStr,
11   where { Email::Valid->address($_) },
12   message { "Must be a valid e-mail address" };
13
14 1;
15
16 =head1 NAME
17
18 Reaction::Types::Email
19
20 =head1 DESCRIPTION
21
22 =over 
23
24 =item * EmailAddress
25
26 =back
27
28 =head1 SEE ALSO
29
30 =over 
31
32 =item * L<Reaction::Types::Core>
33
34 =back
35
36 =head1 AUTHORS
37
38 See L<Reaction::Class> for authors.
39
40 =head1 LICENSE
41
42 See L<Reaction::Class> for the license.
43
44 =cut