更新目录结构
This commit is contained in:
30
app/validate/api/student/Enter.php
Normal file
30
app/validate/api/student/Enter.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\api\student;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Enter extends Validate{
|
||||
|
||||
protected $rule = [
|
||||
'category_id' => 'require',
|
||||
'id_card' => 'require|idCard',
|
||||
'mobile' => 'require|mobile'
|
||||
];
|
||||
protected $message = [
|
||||
'category_id.require' => '科目必选',
|
||||
'id_card.require' => '身份证号码必填',
|
||||
'id_card.idCard' => '身份证号码格式错误',
|
||||
'mobile.require' => '手机号码必填',
|
||||
'mobile.mobile' => '手机号码格式错误'
|
||||
];
|
||||
protected $scene = [
|
||||
'add' => ['category_id', 'id_card']
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user