招标
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
1.2 KiB

<?php
namespace app\api\validate;
use app\common\BaseValidate;
class Member extends BaseValidate
{
protected $rule = [
'username|姓名' => 'require',
'password|密码' => 'require|min:6',
'password_verify' => 'confirm:password',
'mobile|手机号' => 'require|unique:member,delete_time=0',
'company|公司名称' => 'require',
'security_question|密保问题' => 'require',
'security_answer|密保回答' => 'require',
];
protected $message = [
'username.require' => '姓名必填',
'password.require' => '密码必填',
'password.min' => '密码不能少于6位',
'mobile.require' => '手机号必填',
'mobile.unique' => '该手机号已被注册',
'company.require' => '公司名称必填',
'security_question.require' => '密保问题必填',
'security_answer.require' => '密保回答必填',
'password_verify.confirm' => '两个新密码不一致',
];
protected $scene = [
'registered' =>['username','password','password_verify','mobile','company','security_question','security_answer'],
'edit_password' => ['password','password_verify']
];
}