parent
d3c2ded3d4
commit
da57773cd3
|
@ -129,7 +129,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
|
||||
//检查手机或者邮箱是否有效
|
||||
if (!Regex.IsMatch(email, @"^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$"))
|
||||
if (!Regex.IsMatch(email, @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"))
|
||||
{
|
||||
//---Please input a legal email
|
||||
return ResponseOutput.NotOk(_localizer["User_LegalEmail"]);
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public async Task<IResponseOutput> SendEmialVerifyCode(SendEmialVerifyCodeInDto userInfo)
|
||||
{
|
||||
//检查手机或者邮箱是否有效
|
||||
if (!Regex.IsMatch(userInfo.Email, @"^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$"))
|
||||
if (!Regex.IsMatch(userInfo.Email, @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"))
|
||||
{
|
||||
//---请输入正确的邮箱地址。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_InvalidEmail"]);
|
||||
|
@ -124,7 +124,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public async Task<IResponseOutput> SendVerifyCode(SiteSurveySendVerifyCode userInfo)
|
||||
{
|
||||
//检查手机或者邮箱是否有效
|
||||
if (!Regex.IsMatch(userInfo.Email, @"^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$"))
|
||||
if (!Regex.IsMatch(userInfo.Email, @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"))
|
||||
{
|
||||
//---请输入正确的邮箱地址。
|
||||
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_InvalidEmail"]);
|
||||
|
|
Loading…
Reference in New Issue