test stage 1
This commit is contained in:
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
@@ -91,7 +91,8 @@ export default {
|
||||
dotAndMinus: '资源记录不能以 "."、"-" 开头或结尾',
|
||||
doubleDots: '资源记录不能有连续的 "."',
|
||||
logerThan63: '资源记录以 "." 分割的每个字符串长度不能超过63字符'
|
||||
}
|
||||
},
|
||||
tooLong: '记录值过长'
|
||||
}
|
||||
}
|
||||
}
|
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user