| 123456789101112131415161718192021222324252627282930 | 
							- <?php
 
- namespace app\admin\validate\home;
 
- use think\Validate;
 
- class HomeGoodsValidate extends Validate
 
- {
 
-     protected $rule =   [
 
-         'goods_name'  => 'require|max:100',
 
-         'goods_id'    => 'require',
 
-         'goods_category_id' => 'require',
 
-         'goods_img' => 'require',
 
-         'goods_mobile' => 'require',
 
-     ];
 
-     protected $message  =   [
 
-         'goods_name'  => '项目名不能为空',
 
-         'goods_id'    => '项目id不能为空',
 
-         'goods_category_id' => '项目分类不能为空',
 
-         'goods_img' => '项目详情图不能为空',
 
-         'goods_mobile' => '联系电话不能为空',
 
-     ];
 
-     //场景
 
-     protected $scene = [
 
-         'create'   => ['goods_name','goods_category_id','goods_img','goods_mobile'],
 
-         'update'   => ['goods_id'],
 
-         'info'     => ['goods_id']
 
-     ];
 
- }
 
 
  |