<?php namespace app\validate; class Id extends \think\Validate { protected $rule = [ 'id' => 'require', ]; protected $message = [ 'id.require' => '不能为空', ]; }