]> Dogcows Code - chaz/chatty/blob - lib/Chatty/Form/RoomCreate.pm
create, list, and room viewing implemented
[chaz/chatty] / lib / Chatty / Form / RoomCreate.pm
1 package Chatty::Form::RoomCreate;
2
3 use HTML::FormHandler::Moose;
4 extends 'HTML::FormHandler::Model::DBIC';
5 use namespace::autoclean;
6
7 has '+item_class' => (default => 'Room');
8 has '+unique_messages' => (default => sub {
9 {name => 'Room name is already taken'};
10 });
11
12 has_field 'name' => (input_class => 'validate[required]', label => 'Room name', required => 1, unique => 1);
13 has_field 'submit' => (type => 'Submit', value => 'Create');
14
15 __PACKAGE__->meta->make_immutable;
16 1;
This page took 0.033783 seconds and 4 git commands to generate.