| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- // +----------------------------------------------------------------------
- // | 商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2017~2021 https://www.thinkphp.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
- // +----------------------------------------------------------------------
- // | Author: thinkphp <admin@yiovo.com>
- // +----------------------------------------------------------------------
- declare (strict_types = 1);
- namespace app\api\validate\user;
- use think\Validate;
- /**
- * 验证类:用户教育经历
- * Class EducationExp
- * @package app\api\validate\user
- */
- class EducationExp extends Validate
- {
- /**
- * 验证规则
- * @var array
- */
- protected $rule = [
- 'education' => ['require','max:100'],
- 'school_name' => ['require','max:100'],
- 'speciality' => ['require','max:100'],
- 'grade'=> ['require','max:50'],
- ];
- /**
- * 验证提示
- * @var string[]
- */
- protected $message = [
- 'education.require' => '学历不为空',
- 'education.max' => '学历内容最多100字符',
- 'school_name.require' => '学校名称不为空',
- 'school_name.max' => '学校名称最多100字符',
- 'speciality.require' => '专业不为空',
- 'speciality.max' => '专业内容最多100字符',
- 'grade.require' => '年级不为空',
- 'grade.max' => '年级内容最多50字符',
- ];
- }
|