<?php

/**
 * Created by fuju
 * User : hj
 * Date : 2017-12-7
 * Time : 15:15:42
 * Intro: 
 */

namespace app\api\validate;

use think\Validate;

class Users extends Validate {

    protected $rule = [
        'phone'       => 'require|number|length:11',
        'referrer_id' => 'require|number'
    ];
    protected $message = [
        'phone.require' => 'Phone is null',
        'phone.number' => 'Phone must be numbers',
        'phone.length' => 'It\'s not the phone number ',
        'phone.require' => 'referrer_id is null',
        'phone.referrer_id' => 'referrer_id must be numbers',
    ];
    protected $scene = [
        'register' => 'phone,referrer_id'
    ];

}