test stage 1

This commit is contained in:
Sense T
2024-04-19 09:44:37 +08:00
parent b583720223
commit 88b2255f8b
20 changed files with 131 additions and 95 deletions

View File

@@ -91,7 +91,8 @@ export default {
dotAndMinus: 'should not start or end with "." "-"',
doubleDots: 'should have no contianus "."',
logerThan63: 'should not longer than 63 characters splited by "."'
}
},
tooLong: 'too long'
}
}
}

View File

@@ -91,7 +91,8 @@ export default {
dotAndMinus: '资源记录不能以 "."、"-" 开头或结尾',
doubleDots: '资源记录不能有连续的 "."',
logerThan63: '资源记录以 "." 分割的每个字符串长度不能超过63字符'
}
},
tooLong: '记录值过长'
}
}
}

View File

@@ -35,6 +35,7 @@ export class TXTRecord {
static validate(v: TXTRecord): true | Error {
if (!v.text || v.text === '') return new Error(t('common.mandatory'))
if (v.text.length > 512) return new Error('records.errors.tooLong')
return true
}