zzwy2/app/validate/Message.php

21 lines
648 B
PHP
Executable File

<?php
namespace app\validate;
use think\Validate;
class Message extends Validate
{
protected $rule = [
'name' => 'require|length:2,20',
'tel' => 'require|mobile',
'company' => 'require|length:2,200',
];
protected $message = [
'name.require' => '姓名必填',
'name.length' => '请输入有效的姓名',
'tel.require' => '联系方式必填',
'tel.mobile' => '请输入正确格式的手机号',
'company.require' => '公司或团队名称必填',
'company.length' => '请输入有效的公司或团队名称',
];
}