original_string: protected function validatePassword(LoginForm &$loginForm)
      {
          return [
              'password',
              function ($attribute) use (&$loginForm) {
                  if ($loginForm->user === null ||
                      !PasswordHelper::validate($loginForm->password, $loginForm->user->password_hash)
                  ) {
                      $loginForm->addError($attribute, Yii::t('users', 'Invalid login or password'));
                  }
              }
          ];
      }
code: protected function validatePassword(LoginForm &$loginForm)
      {
          return [
              'password',
              function ($attribute) use (&$loginForm) {
                  if ($loginForm->user === null ||
                      !PasswordHelper::validate($loginForm->password, $loginForm->user->password_hash)
                  ) {
                      $loginForm->addError($attribute, Yii::t('users', 'Invalid login or password'));
                  }
              }
          ];
      }
code_tokens: protected function validatePassword ( LoginForm & $ loginForm ) { return [ 'password' , function ( $ attribute ) use ( & $ loginForm ) { if ( $ loginForm -> user === null || ! PasswordHelper :: validate ( $ loginForm -> password , $ loginForm -> user -> password_hash ) ) { $ loginForm -> addError ( $ attribute , Yii :: t ( 'users' , 'Invalid login or password' ) ) ; } } ] ; }
docstring: Adds password validation rule for login scenario
  
  @param \DevGroup\Users\models\LoginForm $loginForm
  
  @return array
docstring_tokens: Adds password validation rule for login scenario