From d12185d43a3c02e9ca6421b9897c7982d9f000bf Mon Sep 17 00:00:00 2001 From: rainzm Date: Sat, 9 Jan 2021 11:29:38 +0800 Subject: [PATCH] fix(notify): loose phone number rules in updating receiver --- pkg/notify/models/receiver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/notify/models/receiver.go b/pkg/notify/models/receiver.go index 4560475d28..fd1d829298 100644 --- a/pkg/notify/models/receiver.go +++ b/pkg/notify/models/receiver.go @@ -681,7 +681,7 @@ func (r *SReceiver) ValidateUpdateData(ctx context.Context, userCred mcclient.To return input, httperrors.NewInputParameterError("invalid email") } // validate mobile - if ok := len(input.Mobile) == 0 || regutils.MatchMobile(input.Mobile); !ok { + if ok := len(input.Mobile) == 0 || LaxMobileRegexp.MatchString(input.Mobile); !ok { return input, httperrors.NewInputParameterError("invalid mobile") } return input, nil