更新
This commit is contained in:
@@ -9,7 +9,7 @@ use Illuminate\Http\Exceptions\HttpResponseException;
|
||||
class LogRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
* Determine if user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ class LogRequest extends FormRequest
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
* Get validation rules that apply to request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -34,6 +34,7 @@ class LogRequest extends FormRequest
|
||||
'username' => 'nullable|string|max:50',
|
||||
'module' => 'nullable|string|max:50',
|
||||
'action' => 'nullable|string|max:100',
|
||||
'method' => 'nullable|in:GET,POST,PUT,DELETE,PATCH',
|
||||
'status' => 'nullable|in:success,error',
|
||||
'start_date' => 'nullable|date',
|
||||
'end_date' => 'nullable|date|after_or_equal:start_date',
|
||||
@@ -77,6 +78,7 @@ class LogRequest extends FormRequest
|
||||
'username.max' => '用户名最多50个字符',
|
||||
'module.max' => '模块名最多50个字符',
|
||||
'action.max' => '操作名最多100个字符',
|
||||
'method.in' => '请求方式必须是 GET、POST、PUT、DELETE 或 PATCH',
|
||||
'status.in' => '状态值必须是 success 或 error',
|
||||
'start_date.date' => '开始日期格式不正确',
|
||||
'end_date.date' => '结束日期格式不正确',
|
||||
@@ -121,7 +123,7 @@ class LogRequest extends FormRequest
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the data for validation.
|
||||
* Prepare for validation.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user