mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
refactor:取消前台用户头像必填
This commit is contained in:
parent
1375ac6a95
commit
eaad703a54
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
return [
|
||||
'avatar' => 'Avatar',
|
||||
'username' => 'Username',
|
||||
'nickname' => 'Nickname',
|
||||
'birthday' => 'Birthday',
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
return [
|
||||
'avatar' => '头像',
|
||||
'username' => '用户名',
|
||||
'nickname' => '昵称',
|
||||
'birthday' => '生日',
|
||||
|
@ -9,7 +9,6 @@ class Account extends Validate
|
||||
protected $failException = true;
|
||||
|
||||
protected $rule = [
|
||||
'avatar' => 'require',
|
||||
'username' => 'require|regex:^[a-zA-Z][a-zA-Z0-9_]{2,15}$|unique:user',
|
||||
'nickname' => 'require|chsDash',
|
||||
'birthday' => 'date',
|
||||
@ -24,7 +23,7 @@ class Account extends Validate
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'edit' => ['avatar', 'username', 'nickname', 'birthday'],
|
||||
'edit' => ['username', 'nickname', 'birthday'],
|
||||
'changePassword' => ['password'],
|
||||
'retrievePassword' => ['account', 'captcha', 'password'],
|
||||
];
|
||||
@ -32,7 +31,6 @@ class Account extends Validate
|
||||
public function __construct()
|
||||
{
|
||||
$this->field = [
|
||||
'avatar' => __('avatar'),
|
||||
'username' => __('username'),
|
||||
'nickname' => __('nickname'),
|
||||
'birthday' => __('birthday'),
|
||||
|
@ -301,7 +301,6 @@ const state: {
|
||||
formSubmitLoading: false,
|
||||
form: userInfo.$state,
|
||||
rules: {
|
||||
avatar: [buildValidatorData({ name: 'required', message: t('Please select field', { field: t('user.account.profile.head portrait') }) })],
|
||||
username: [buildValidatorData({ name: 'required', title: t('user.account.profile.User name') }), buildValidatorData({ name: 'account' })],
|
||||
nickname: [buildValidatorData({ name: 'required', title: t('user.account.profile.nickname') })],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user