'require|chsDash|max:30', 'name' => 'require|chsDash|max:20', 'type' => 'require|in:wqbp,live', 'phone' => 'require|mobile' ]; // 验证消息 protected $message = [ 'company.require' => '请填写公司名称', 'company.chsDash' => '公司名称格式错误', 'company.max' => '公司名称30字以内', 'name.require' => '请填写姓名', 'name.chsDash' => '姓名格式错误', 'name.max' => '姓名限制20字以内', 'type.require' => '未检测到分类名称', 'type.in' => '分类格式错误', 'phone.require' => '请输入联系电话', 'phone.mobile' => '电话格式错误', ]; // 验证场景 protected $scene = [ 'do' => ['company', 'name', 'type', 'phone'], ]; }