public function passwordRequirements($attribute)
    {
        if (!preg_match('~\p{Lu}~', $this->$attribute) ||
            !preg_match('~\p{Ll}~', $this->$attribute) ||
            !preg_match('~[0-9]~', $this->$attribute) ||
            mb_strlen($this->$attribute, 'UTF-8') < 6 ||
            mb_strlen($this->$attribute, 'UTF-8') > 100) {
            $this->addError($attribute, Yii::t('podium/view', 'Password must contain uppercase and lowercase letter, digit, and be at least 6 characters long.'));
        }
    }
public function passwordRequirements($attribute)
    {
        if (!preg_match('~\p{Lu}~', $this->$attribute) ||
            !preg_match('~\p{Ll}~', $this->$attribute) ||
            !preg_match('~[0-9]~', $this->$attribute) ||
            mb_strlen($this->$attribute, 'UTF-8') < 6 ||
            mb_strlen($this->$attribute, 'UTF-8') > 100) {
            $this->addError($attribute, Yii::t('podium/view', 'Password must contain uppercase and lowercase letter, digit, and be at least 6 characters long.'));
        }
    }
public function passwordRequirements ( $ attribute ) { if ( ! preg_match ( '~\p{Lu}~' , $ this -> $ attribute ) || ! preg_match ( '~\p{Ll}~' , $ this -> $ attribute ) || ! preg_match ( '~[0-9]~' , $ this -> $ attribute ) || mb_strlen ( $ this -> $ attribute , 'UTF-8' ) < 6 || mb_strlen ( $ this -> $ attribute , 'UTF-8' ) > 100 ) { $ this -> addError ( $ attribute , Yii :: t ( 'podium/view' , 'Password must contain uppercase and lowercase letter, digit, and be at least 6 characters long.' ) ) ; } }
Finds out if unencrypted password fulfill requirements.
@param string $attribute
Finds out if unencrypted password fulfill requirements .