v2board/app/Http/Requests/Admin/TutorialSave.php

32 lines
649 B
PHP
Raw Normal View History

2020-01-02 21:38:32 +08:00
<?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
class TutorialSave extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'title' => 'required',
'description' => 'required',
2020-01-02 21:49:04 +08:00
'icon' => 'required'
2020-01-02 21:38:32 +08:00
];
}
2020-01-11 13:36:52 +08:00
2020-01-02 21:38:32 +08:00
public function messages()
{
return [
'title.required' => '标题不能为空',
'description.required' => '描述不能为空',
2020-01-02 21:49:04 +08:00
'icon.required' => '图标不能为空'
2020-01-02 21:38:32 +08:00
];
}
}