modules/api/v2/models/Login.php
/**
     * @return array the validation rules.
     */
@return array the validation rules.
@return array the validation rules .
public function rules()
    {
        return [
            [['email', 'password'], 'required', 'on' => self::SCENARIO_LOGIN_FROM_APP],
            [['access_token_expired_at', 'token_type'], 'safe'],
            [['access_token'], 'string', 'max' => 255],
            ['password', 'validatePassword'],
        ];
    }
public function rules ( ) { return [ [ [ 'email' , 'password' ] , 'required' , 'on' => self :: SCENARIO_LOGIN_FROM_APP ] , [ [ 'access_token_expired_at' , 'token_type' ] , 'safe' ] , [ [ 'access_token' ] , 'string' , 'max' => 255 ] , [ 'password' , 'validatePassword' ] , ] ; }
@return array the validation rules.
@return array the validation rules .
// password is validated by validatePassword()