MemberSalesValidate.php 779 字节
<?php
/**
 * Created by PhpStorm.
 * User: 29925
 * Date: 2018/8/9
 * Time: 16:54
 */

namespace app\member\validate;

use think\Validate;

class MemberSalesValidate extends Validate
{

    protected $rule = [
        'user_login'       => 'require|unique:member_sales,user_login',
        'user_pass'        => 'require',
        'allow_order'      => 'require',
    ];

    protected $message = [
        'user_login.require' => '用户不能为空',
        'user_login.unique'  => '用户名已存在',
        'user_pass.require'  => '密码不能为空',
        'allow_order.require'=> '可见订单类型不能为空',
    ];

    protected $scene = [
        'add'  => ['user_login', 'user_pass', 'allow_order'],
        'edit' => ['user_login', 'allow_order'],
    ];
}