src/scenarios/BaseAuthorizationPair.php
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'));
                }
            }
        ];
    }
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'));
                }
            }
        ];
    }
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' ) ) ; } } ] ; }
Adds password validation rule for login scenario

@param \DevGroup\Users\models\LoginForm $loginForm

@return array
Adds password validation rule for login scenario