Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Joe::Registration::Form;
- use HTML::FormHandler::Moose;
- extends 'HTML::FormHandler';
- has '+item_class' => ( default => 'Registration' );
- has_field username => (
- type => 'Username',
- label => 'Username',
- required => 1,
- );
- has_field email => (
- type => 'Email',
- label => 'Email Address',
- required => 1,
- );
- has_field password => (
- type => 'Password',
- label => 'Password',
- required => 1,
- );
- subtype 'Username'
- => as 'Str'
- => where {$_ =~ /[\d\w]{1,16}/}
- => message { "Can only contain letters and numbers" };
- no HTML::FormHandler::Moose;
Add Comment
Please, Sign In to add comment