<?php

namespace app\common\validate;


use think\Validate;

/**
 
 * 
 
 * 
 * ----------------------------------------------------------------------------
 * 
 
 * 验证器
 */
class  Storegrade extends Validate
{
    protected $rule = [
        'storegrade_name' => 'require',
        'storegrade_sort' => 'require|number|between:1,255'

    ];
    protected $message = [
        'storegrade_name.require' => '店铺等级名称必填',
        'storegrade_sort.require' => '排序为必填',
        'storegrade_sort.number' => '排序必须是数字',
        'storegrade_sort.between' => '等级级别不能大于255'

    ];
    protected $scene = [
        'add' => ['storegrade_name', 'storegrade_sort'],
        'edit' => ['storegrade_name', 'storegrade_sort'],
    ];
}
