Last active
August 13, 2022 18:35
-
-
Save jjn1056/708088ddbc468edfa17e1a9fd587cdec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Example::Model::RegistrationInterfaceModel; | |
use Valiant::IM::Form; | |
field user_name => type=>'InputGroup', %opts; | |
field first_name => type=>'InputGroup', %opts; | |
field last_name => type=>'InputGroup', %opts; | |
1; | |
package Example::Controller::Registration | |
sub root($self, $c) { | |
my $interface = $c->model('RegistrationInterfaceModel', model=>$c->user); | |
my $form = Valiant::IM::FormBuilderAdaptor->interface($interface); | |
$c->view(Registration => registration_form => $form ), | |
package Example::Model::RegistrationForm; | |
use Moose; | |
use Valiant::HTML::FormAdaptor; | |
input 'username'; | |
input 'first_name'; | |
input 'last_name'; | |
password 'password'; | |
password 'password_confirmation'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment