feat: add article and production modules
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace plugin\produce\app\validate;
|
||||
|
||||
use core\base\BaseValidate;
|
||||
|
||||
class MaterialCategoryValidate extends BaseValidate
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return ['category_name' => ['required', 'max:100']];
|
||||
}
|
||||
|
||||
protected array $message = [
|
||||
'category_name.required' => '分类名称不能为空',
|
||||
'category_name.max' => '分类名称不能超过100个字符',
|
||||
];
|
||||
|
||||
protected array $scene = [
|
||||
'store' => ['category_name'],
|
||||
'update' => ['category_name'],
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user