修改邮箱配置校验

This commit is contained in:
2025-07-21 14:23:09 +08:00
parent bae6f099fe
commit f2836a8928
6 changed files with 9 additions and 4 deletions
@@ -128,7 +128,7 @@ namespace IRaCIS.Core.Application.Service
{
//检查手机或者邮箱是否有效
if (!Regex.IsMatch(email, @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"))
if (!Regex.IsMatch(email, _systemEmailConfig.EmailRegexStr))
{
//---Please input a legal email
return ResponseOutput.NotOk(_localizer["User_LegalEmail"]);
@@ -325,7 +325,7 @@ namespace IRaCIS.Core.Application.Service
{
//检查手机或者邮箱是否有效
if (!Regex.IsMatch(email, @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"))
if (!Regex.IsMatch(email, _systemEmailConfig.EmailRegexStr))
{
//---请输入一个正确的邮箱。