| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 | <?php/** * @copyright   Copyright (c) 2017 https://www.sapixx.com All rights reserved. * @license     Licensed (http://www.apache.org/licenses/LICENSE-2.0). * @author      pillar<ltmn@qq.com> * 店铺管理 */namespace app\ais\validate;use think\Validate;class Card extends Validate{    protected $rule = [        'id'                => 'require|number',        'store_id'          => 'require|number',        'name'              => 'require',        'price'             => 'require|float|>:0',        'locktime'          => 'require|date',        'tips'              => 'require',        'coupon_id'         => 'require|integer',        'amount'            => 'require|integer|>:0',        'howmuch'           => 'require|integer',        'content'           => 'require',        'num'               => 'require|integer|>:0',    ];        protected $message = [        'id'                => '编辑ID丢失',        'store_id'          => '当前店铺不存在',        'name'              => '储值活动名称必须填写',        'price'             => '付款金额必须输入',        'locktime'          => '活动结束日期必须输入',        'tips'              => '使用须知必须输入',        'coupon_id'         => '必须选择优惠券',        'amount'            => '储值额度必须填写',        'howmuch'           => '使用门槛必须填写', //客户端创建储值活动        'content'           => '使用须知必须输入',        'num'               => '发现数量必须输入',    ];    protected $scene = [        'edit' => ['id','store_id','name','price','amount','howmuch','name','tips','content','locktime','num'],        'api' => ['id','name','price','amount','howmuch','name','tips','content','locktime','num'],    ];}
 |