class StoreVacancy extends FormRequest
{
    public function rules()
    {
        $reason = $this->request->get('reason'); // 获取请求数据
        $rules = [
            'title' => 'required',
            'type'  => 'required',
        ];

        // 根据条件确定是否需要验证
        if ($reason >= 100) {
            $rules['complex_field'] = 'required|max:500';
        }

        return $rules; // 返回条件
    }
}