From 8a2a91815b045b9b99d6585055d899b895191e78 Mon Sep 17 00:00:00 2001 From: LiarCoder Date: Thu, 20 Feb 2025 19:37:18 +0800 Subject: [PATCH 1/2] fix: Fix phone number validation logic --- src/components/newCustomFields/components/WidgetsVerifyCode.jsx | 2 +- src/pages/accountLogin/redux/actions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/newCustomFields/components/WidgetsVerifyCode.jsx b/src/components/newCustomFields/components/WidgetsVerifyCode.jsx index fd533a9de..b1f938bac 100644 --- a/src/components/newCustomFields/components/WidgetsVerifyCode.jsx +++ b/src/components/newCustomFields/components/WidgetsVerifyCode.jsx @@ -42,7 +42,7 @@ export default class WidgetsVerifyCode extends Component { isAvailable = false; } else { this.iti.setNumber(value); - if (!(this.iti.isValidNumber() || specialTelVerify(value))) { + if (!this.iti.isValidNumber() || !specialTelVerify(value)) { isAvailable = false; } } diff --git a/src/pages/accountLogin/redux/actions.js b/src/pages/accountLogin/redux/actions.js index 6b7a9b7fa..0f168d003 100644 --- a/src/pages/accountLogin/redux/actions.js +++ b/src/pages/accountLogin/redux/actions.js @@ -130,7 +130,7 @@ export const isValid = (isForSendCode, keys = [], type) => { }; //手机号验证 const isTelRule = () => { - if (!iti.isValidNumber() && !specialTelVerify(iti.getNumber())) { + if (!iti.isValidNumber() || !specialTelVerify(iti.getNumber())) { warnningData.push({ tipDom: '#txtMobilePhone', warnningText: _l('手机号格式错误') }); isRight = false; } From a6b244b3464c52192eb3d88dc88d41748c899395 Mon Sep 17 00:00:00 2001 From: LiarCoder Date: Thu, 20 Feb 2025 19:38:51 +0800 Subject: [PATCH 2/2] chore: Ignore IntelliJ IDEA project files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9d889fc38..f580db7f9 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,8 @@ node_modules/* **/.vscode/** *.vscode +**/.idea/** +*.idea # Use yarn package-lock.json