|
|
@@ -31,16 +31,30 @@ class AgriculturalMachineryServiceCategoryValidate extends BaseValidate
|
|
|
'name' => 'require|length:1,60',
|
|
|
'status' => 'require|in:0,1',
|
|
|
'sort' => 'egt:0',
|
|
|
+ 'type' =>'require|in:1,2,3',
|
|
|
];
|
|
|
|
|
|
protected $message = [
|
|
|
- 'id.require' => ' 农耕分类id不能为空',
|
|
|
- 'name.require' => '农耕分类名称不能为空',
|
|
|
- 'name.length' => '农耕分类长度须在1-60位字符',
|
|
|
+ 'id.require' => ' 分类id不能为空',
|
|
|
+ 'name.require' => '分类名称不能为空',
|
|
|
+ 'name.length' => '分类长度须在1-60位字符',
|
|
|
'sort.egt' => '排序值不正确',
|
|
|
+ 'type.require' => '类型不能为空',
|
|
|
+ 'type.in' => '类型值type参数规则错误',
|
|
|
];
|
|
|
|
|
|
/**
|
|
|
+ * @notes 列表
|
|
|
+ * @return ArticleCateValidate
|
|
|
+ * @author heshihu
|
|
|
+ * @date 2022/2/10 15:11
|
|
|
+ */
|
|
|
+ public function sceneList()
|
|
|
+ {
|
|
|
+ return $this->only(['type']);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* @notes 添加场景
|
|
|
* @return ArticleCateValidate
|
|
|
* @author heshihu
|
|
|
@@ -76,6 +90,8 @@ class AgriculturalMachineryServiceCategoryValidate extends BaseValidate
|
|
|
|
|
|
public function sceneEdit()
|
|
|
{
|
|
|
+ return $this
|
|
|
+ ->remove('type', 'require');
|
|
|
}
|
|
|
|
|
|
/**
|