2020-04-16 23:01:18 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Admin;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
2020-10-18 02:51:32 +08:00
|
|
|
class KnowledgeCategorySave extends FormRequest
|
2020-04-16 23:01:18 +08:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
2020-10-18 02:51:32 +08:00
|
|
|
'name' => 'required',
|
|
|
|
'language' => 'required'
|
2020-04-16 23:01:18 +08:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function messages()
|
|
|
|
{
|
|
|
|
return [
|
2020-10-18 02:51:32 +08:00
|
|
|
'name.required' => '分类名称不能为空',
|
|
|
|
'language.required' => '分类语言不能为空'
|
2020-04-16 23:01:18 +08:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|