<?php
namespace app\api\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'appid'         =>  'require',
        'user_id'       =>  'require|max:255',
        'name'          =>  'require|max:25',
        'level'         =>  'number|between:0,3',
        'overdue_time'  => 'number'
    ];

    protected $message  =   [
        'appid.require'     => 'appid 不可為空',
        'user_id.require'   => 'User Id不可為空',
        'name.require'      => 'Name不得為空',
        'name.max'          => 'Name不得超過25個字',
        'level.number'      => 'Level必需是數字',
        'level.between'     => 'Level只能在0-3之間',
        'overdue_time.require'      => 'overdue_time必需是數字',    
    ];
}