From b54f1c796595671bd753a9161eccad074d444273 Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期三, 16 三月 2022 17:45:36 +0800
Subject: [PATCH] 询价失单预留产品无效
---
force-app/main/default/pages/NewAndEditContact.page | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/pages/NewAndEditContact.page b/force-app/main/default/pages/NewAndEditContact.page
index 0a78a75..ef36178 100644
--- a/force-app/main/default/pages/NewAndEditContact.page
+++ b/force-app/main/default/pages/NewAndEditContact.page
@@ -195,12 +195,12 @@
let textPhone = "[data-id='Phone']";
//Email
let email = document.querySelector(textEmail);
- if(email && !/^[\w-]{3,12}@[\da-zA-Z]{2,16}\.[a-zA-Z]+$/.test(email.value)){
+ if(email && email.previousSibling && email.previousSibling.className.indexOf('requiredBlock')>-1 && !/^[\w-]{3,12}@[\da-zA-Z]{2,16}\.[a-zA-Z]+$/.test(email.value)){
error_msg += ';閭欢鏍煎紡閿欒';
}
let phone = document.querySelector(textPhone);
- if(phone && !/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){
+ if(phone && phone.previousSibling && phone.previousSibling.className.indexOf('requiredBlock')>-1 && !/^1[3|5|8|7][0-9]\d{4,8}$/.test(phone.value)){
error_msg += ';鐢佃瘽鍙风爜閿欒';
}
--
Gitblit v1.9.1