logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

CatalystX::SimpleLogin::Form::Login - validation for the login form

Authors

       See CatalystX::SimpleLogin for authors.

Customization

       By  default,  the  params  passed  to  authenticate()  are  'username' and 'password'. If you need to use
       different names, then you'll need to set the correct value(s) via login_form_args in  the  configuration.
       The keys are 'authenticate_username_field_name' and/or 'authenticate_password_field_name'.

           __PACKAGE__->config(
               'Controller::Login' => {
                   login_form_args => {
                      authenticate_username_field_name => 'name',
                      authenticate_password_field_name => 'password2',
                   },
               },
           );

       You can also change the way that the form is displayed by setting attributes.  In MyApp.pm:

           __PACKAGE__->config(
               'Controller::Login' => {
                   login_form_args => {
                      login_error_message => 'Login failed',
                      field_list => [
                          '+submit' => { value => 'Login' },
                      ]
                   }
               },
           );

       Additional fields can be added:

          field_list => [
              'foo' => ( type => 'MyField' ),
              'bar' => { type => 'Text' },
          ]

       Additional  arguments to the authenticate call can be added: If your user table has a column "status" and
       you want only those with "status = 'active'"to be able to log .in

           __PACKAGE__->config(
               'Controller::Login' => {
                   login_form_args => {
                       authenticate_args => { status => 1 },
                   },
               },
           };

Description

       A HTML::FormHandler form for the login form.

Fields

       username
       password
       remember
       submit

License

       See CatalystX::SimpleLogin for license.

perl v5.36.0                                       2022-08-28              CatalystX::Sim...in::Form::Login(3pm)

Methods

       validate
       add_auth_errors

Name

       CatalystX::SimpleLogin::Form::Login - validation for the login form

See Also

       CatalystX::SimpleLogin::Controller::Login

See Also