<?php

namespace Modules\Base\Http\Requests;

class OpenloginRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $type = $this->route('type');
        switch ($type) {
            case 'test':
            case 'wx_mini':
                return [
                    'code' => 'bail|required',
                ];
        }

        return [];
    }
}
