You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
874 B
43 lines
874 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Request;
|
|
|
|
use Hyperf\Validation\Request\FormRequest;
|
|
|
|
class UpdateShopCarRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'id' => 'required|nonempty|integer|exists_enable:ims_cjdc_shopcar,id',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'id.exists_enable' => ':attribute不存在或被禁用',
|
|
'service_personnel_id.*' => ':attribute信息不正确'
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'id' => '购物车记录',
|
|
];
|
|
}
|
|
}
|