'require', 'sp_sort'=>'require|number', 'gc_id'=>'require|number', ]; protected $message = [ 'sp_name.require'=>'规格名称为必填', 'sp_sort.require'=>'规格排序为必填', 'sp_sort.number'=>'规格排序必须为数字', 'gc_id.require'=>'分类为必填', 'gc_id.number'=>'分类ID必须为数字', ]; protected $scene = [ 'spec_add' => ['sp_name', 'sp_sort', 'gc_id'], 'spec_edit' => ['sp_name', 'sp_sort', 'gc_id'], ]; }