fix(knowledge_base): Unchecked metadata name length (#21454)
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
8ea27bc341
commit
c7ee0f2a93
3 changed files with 15 additions and 0 deletions
|
|
@ -18,6 +18,12 @@ const useCheckMetadataName = () => {
|
|||
}
|
||||
}
|
||||
|
||||
if (name.length > 255) {
|
||||
return {
|
||||
errorMsg: t(`${i18nPrefix}.tooLong`, { max: 255 }),
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
errorMsg: '',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ const translation = {
|
|||
checkName: {
|
||||
empty: 'Metadata name cannot be empty',
|
||||
invalid: 'Metadata name can only contain lowercase letters, numbers, and underscores and must start with a lowercase letter',
|
||||
tooLong: 'Metadata name cannot exceed {{max}} characters',
|
||||
},
|
||||
batchEditMetadata: {
|
||||
editMetadata: 'Edit Metadata',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue