feat: add some field limits

This commit is contained in:
zhaojisen
2026-04-09 17:22:48 +08:00
committed by ZhaoJiSen
parent 5ed0de8a52
commit 52d3f84330
4 changed files with 20475 additions and 15180 deletions

1
.gitignore vendored
View File

@@ -8,6 +8,7 @@ yarn-debug.log*
yarn-error.log*
package-lock.json
tests/**/coverage/
.yarn/*
# Editor directories and files
.idea

1
.yarnrc.yml Normal file
View File

@@ -0,0 +1 @@
nodeLinker: node-modules

View File

@@ -110,6 +110,18 @@ export default {
],
fieldsMeta: {
login_title: {
rules: [
{
validator: (rule, value, callback) => {
if (!String(value || '').trim()) {
callback(new Error(this.$t('FieldRequiredError')))
return
}
callback()
},
trigger: ['blur', 'change']
}
]
},
theme: {
on: {
@@ -193,7 +205,19 @@ export default {
el: {
preview: true,
rows: 5
}
},
rules: [
{
validator: (rule, value, callback) => {
if (String(value || '').length > 200) {
callback(new Error(this.$t('FooterContentTooLong200')))
return
}
callback()
},
trigger: ['blur', 'change']
}
]
}
},
url: '/api/v1/xpack/interface/setting/',

35627
yarn.lock

File diff suppressed because it is too large Load Diff