update regexp

This commit is contained in:
Sense T 2024-04-09 10:06:47 +08:00
parent 84e9961f4b
commit c93e8107dc

View File

@ -124,7 +124,7 @@ const rules = {
validator: (_rule: FormItemRule, value: string) => { validator: (_rule: FormItemRule, value: string) => {
return validate( return validate(
value, value,
/([\w-]+\.)+[\w-]+/, /^([\w-]+\.)+[\w-]+$/,
'domains.errors.domainName', 'domains.errors.domainName',
validFlags.domainNameValid validFlags.domainNameValid
) )
@ -137,7 +137,7 @@ const rules = {
validator: (_rule: FormItemRule, value: string) => { validator: (_rule: FormItemRule, value: string) => {
return validate( return validate(
value, value,
/([\w-]+\.)+[\w-]+/, /^([\w-]+\.)+[\w-]+$/,
'domains.errors.domainName', 'domains.errors.domainName',
validFlags.mainNsValid, validFlags.mainNsValid,
) )
@ -149,7 +149,7 @@ const rules = {
validator: (_rule: FormItemRule, value: string) => { validator: (_rule: FormItemRule, value: string) => {
return validate( return validate(
value, value,
/[\w-.]+@([\w-]+\.)+[\w-]+/, /^[\w-.]+@([\w-]+\.)+[\w-]+$/,
'domains.errors.mail', 'domains.errors.mail',
validFlags.adminEmailValid validFlags.adminEmailValid
) )