UserAuthExamineRequests.php
750 Bytes
<?php
namespace App\Http\Container\AppSection\Requests;
use Hikoon\LaravelApi\Support\ApiRequest;
class UserAuthExamineRequests extends ApiRequest
{
public function rules(): array
{
return [
'id' => 'required|int',
'status' => 'required|integer|between:1,2',
'reason' => 'string'
];
}
public function messages(): array
{
return [
'id.required' => 'id为必填项。',
'id.int' => 'id为整数类型',
'status.required' => 'status为必填项。',
'status.integer' => 'status为整数类型',
'status.between' => 'status范围在1-2',
'reason' => 'reason为字符串类型'
];
}
}