StoreValidate.php 1.1 KB
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\portal\validate;

use think\Validate;

class StoreValidate extends Validate
{
    protected $rule = [
        'store_name' => 'require',
        'tel' => ['regex'=>'/^1(3|4|5|7|8)\d{9}$/','require'],
        'password' => 'require',
    ];
    protected $message = [
        'store_name.require' => '店铺名称不为空!',
        'tel.require' => '店长手机号不能为空!',
        'tel.regex' => '店长手机号不正确!',
        'password.require' => '密码不能为空!',
    ];

    protected $scene = [

    ];

}