mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-01 07:01:26 +00:00
fix: 完善页面邮箱地址校验规则
Closes https://github.com/jumpserver/trello/issues/933
This commit is contained in:
parent
191900381a
commit
30c1284a41
@ -8,7 +8,14 @@ export const RequiredChange = {
|
||||
required: true, message: i18n.t('common.fieldRequiredError'), trigger: 'change'
|
||||
}
|
||||
|
||||
export const EmailCheck = {
|
||||
type: 'email',
|
||||
message: i18n.t('common.InputEmailAddress'),
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
|
||||
export default {
|
||||
Required,
|
||||
RequiredChange
|
||||
RequiredChange,
|
||||
EmailCheck
|
||||
}
|
||||
|
@ -320,6 +320,7 @@
|
||||
"fieldRequiredError": "这个字段是必填项",
|
||||
"getErrorMsg": "获取失败",
|
||||
"MFAErrorMsg": "MFA错误,请检查",
|
||||
"InputEmailAddress": "请输入正确的邮箱地址",
|
||||
"imExport": {
|
||||
"ExportAll": "导出所有",
|
||||
"ExportOnlyFiltered": "仅导出搜索结果",
|
||||
|
@ -277,6 +277,7 @@
|
||||
"Reset": "Reset",
|
||||
"Search": "Search",
|
||||
"MFAErrorMsg": "MFA Error,please check",
|
||||
"InputEmailAddress": "Please enter your email address",
|
||||
"Select": "Select",
|
||||
"SelectFile": "Select file",
|
||||
"Show": "Show",
|
||||
|
@ -4,6 +4,7 @@
|
||||
:fields="fields"
|
||||
:url="url"
|
||||
:get-method="getMethod"
|
||||
:fields-meta="fieldsMeta"
|
||||
:more-buttons="moreButtons"
|
||||
:has-detail-in-msg="false"
|
||||
/>
|
||||
@ -14,6 +15,7 @@
|
||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
||||
import { testEmailSetting } from '@/api/settings'
|
||||
import { IBox } from '@/components'
|
||||
import rules from '@/components/DataForm/rules'
|
||||
|
||||
export default {
|
||||
name: 'Email',
|
||||
@ -51,6 +53,24 @@ export default {
|
||||
]
|
||||
]
|
||||
],
|
||||
fieldsMeta: {
|
||||
EMAIL_HOST_USER: {
|
||||
rules: [
|
||||
rules.EmailCheck,
|
||||
rules.Required
|
||||
]
|
||||
},
|
||||
EMAIL_FROM: {
|
||||
rules: [
|
||||
rules.EmailCheck
|
||||
]
|
||||
},
|
||||
EMAIL_RECIPIENT: {
|
||||
rules: [
|
||||
rules.EmailCheck
|
||||
]
|
||||
}
|
||||
},
|
||||
url: '/api/v1/settings/setting/?category=email',
|
||||
moreButtons: [
|
||||
{
|
||||
|
@ -42,6 +42,12 @@ export default {
|
||||
return this.$route.params.id
|
||||
}
|
||||
},
|
||||
email: {
|
||||
rules: [
|
||||
rules.EmailCheck,
|
||||
rules.Required
|
||||
]
|
||||
},
|
||||
update_password: {
|
||||
label: this.$t('users.UpdatePassword'),
|
||||
type: 'checkbox',
|
||||
|
Loading…
Reference in New Issue
Block a user