Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
HUAHUAI23 committed Jan 15, 2025
1 parent 8789aab commit 4dca99a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions frontend/desktop/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"confirm_again": "confirm again",
"confirmnewpassword": "Confirm New Password",
"contact_info": "Phone Number",
"contact_info_must_be_numeric": "It must be a numeric string",
"contact_info_required": "Please enter the correct contact information",
"core": "Core",
"cost_center": "Cost Center",
Expand Down Expand Up @@ -86,7 +87,6 @@
"enterprise_realname_payment_success": "Verify that the amount has been transferred to your company's bank account.",
"enterprise_realname_verify_failed": "Enterprise real-name verification failed.",
"enterprise_realname_verify_success": "Enterprise real-name verification successful.",
"transAmt_not_match": "The verification amount does not match. Please note that the verification amount is in cents. For example, if the received amount is 0.23 yuan, enter 23.",
"enterprise_verification": "Enterprise real name",
"expected_to_use_next_month": "Usage for the next 30 days",
"expected_used": "Estimated Runaway",
Expand Down Expand Up @@ -258,6 +258,7 @@
"the_invited_user_must_be_others": "The invited user must be others",
"toggle_app_bar": "Toggle App Bar",
"total_amount": "Total Amount",
"transAmt_not_match": "The verification amount does not match. Please note that the verification amount is in cents. For example, if the received amount is 0.23 yuan, enter 23.",
"unbind": "Unbind",
"unbind_success": "Unbinding successfully",
"unbound": "Not Linked",
Expand Down Expand Up @@ -297,4 +298,4 @@
"you_can_view_fees_through_the_fee_center": "You can view fees through the fee center",
"you_have_not_purchased_the_license": "You have not purchased the License",
"yuan": "Yuan"
}
}
5 changes: 3 additions & 2 deletions frontend/desktop/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"confirm_again": "再次确认",
"confirmnewpassword": "确认新密码",
"contact_info": "联系方式 (手机号码)",
"contact_info_must_be_numeric": "必须是数字字符串",
"contact_info_required": "请输入正确的联系方式",
"core": "",
"create_team": "创建工作空间",
Expand Down Expand Up @@ -83,7 +84,6 @@
"enterprise_realname_payment_success": "验证金额已经打款到您的企业开户银行",
"enterprise_realname_verify_failed": "企业实名失败",
"enterprise_realname_verify_success": "企业实名成功",
"transAmt_not_match": "验证金额不匹配,注意验证金额单位是分,例如收到的打款金额为 0.23 元 则输入23。",
"enterprise_verification": "企业实名",
"expected_to_use_next_month": "未来30天预计使用",
"expected_used": "预计还能使用",
Expand Down Expand Up @@ -251,6 +251,7 @@
"team": "工作空间",
"the_invited_user_must_be_others": "只能邀请其他人",
"toggle_app_bar": "切换应用栏",
"transAmt_not_match": "验证金额不匹配,注意验证金额单位是分,例如收到的打款金额为 0.23 元 则输入23。",
"unbind": "解绑",
"unbind_success": "解绑成功",
"unbound": "未绑定",
Expand Down Expand Up @@ -290,4 +291,4 @@
"you_can_view_fees_through_the_fee_center": "您可通过费用中心查看费用",
"you_have_not_purchased_the_license": "您还没有购买 License",
"yuan": ""
}
}
5 changes: 4 additions & 1 deletion frontend/desktop/src/components/account/RealNameModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,10 @@ function EnterpriseVerification(
accountNo: z.string().min(1, { message: t('common:account_number_required') }),
keyName: z.string().min(1, { message: t('common:enterprise_name_required') }),
usrName: z.string().min(1, { message: t('common:user_name_required') }),
contactInfo: z.string().min(1, { message: t('common:contact_info_required') })
contactInfo: z
.string()
.min(1, { message: t('common:contact_info_required') })
.regex(/^\d+$/, { message: t('common:contact_info_must_be_numeric') })
});

const { data: enterpriseRealNameAuthInfo, isLoading: enterpriseRealNameAuthInfoLoading } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const schema = z.object({
accountNo: z.string().min(1),
keyName: z.string().min(1),
usrName: z.string().min(1),
contactInfo: z.string().min(1)
contactInfo: z.string().min(1).regex(/^\d+$/, 'Contact info must contain only numbers')
});

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
Expand Down

0 comments on commit 4dca99a

Please sign in to comment.