This commit is contained in:
2025-12-24 16:59:05 +08:00
parent b52a51c09b
commit b68946fe79
218 changed files with 10790 additions and 3878 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace app\validate;
use taoser\Validate;
class User extends Validate
{
protected $rule = [
'username' => 'require|max:25',
'email' => 'email',
'mobile' => 'mobile',
'password' => 'require|max:32'
];
// 定义信息
protected $message = [
'username.require' => '去设置用户名',
'username.max' => '用户名最多不能超过25个字符',
'mobile' => '手机号格式错误',
'email' => '邮箱格式错误',
'password.require' => '请设置密码',
'password.max' => '密码最多不能超过32个字符',
];
//定义场景
protected $scene = [
'register.email' => ['email','password'],
'register.username' => ['username','password'],
'register.mobile' => ['mobile','password'],
];
}