From 4ae344f33ebc1a919c779a5200bf9bd4c9d1a5bc Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 8 Dec 2020 10:11:41 -0800 Subject: [PATCH] Added phone validation + new phone input box IO-414 --- .../chat-new-conversation.component.jsx | 13 ++++- .../contract-form/contract-form.component.jsx | 6 ++- .../phone-form-item.component.jsx | 52 ++++++++++++------- .../phone-form-item.styles.scss | 6 +++ .../jobs-create-jobs-info.component.jsx | 8 ++- .../jobs-create-owner-info.new.component.jsx | 11 +++- .../jobs-detail-general.component.jsx | 14 +++-- .../owner-detail-form.component.jsx | 13 ++++- .../shop-info/shop-info.component.jsx | 13 ++++- .../vendors-form/vendors-form.component.jsx | 4 +- 10 files changed, 105 insertions(+), 35 deletions(-) create mode 100644 client/src/components/form-items-formatted/phone-form-item.styles.scss diff --git a/client/src/components/chat-new-conversation/chat-new-conversation.component.jsx b/client/src/components/chat-new-conversation/chat-new-conversation.component.jsx index 1fd219662..907c5149c 100644 --- a/client/src/components/chat-new-conversation/chat-new-conversation.component.jsx +++ b/client/src/components/chat-new-conversation/chat-new-conversation.component.jsx @@ -5,7 +5,9 @@ import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { openChatByPhone } from "../../redux/messaging/messaging.actions"; -import PhoneFormItem from "../form-items-formatted/phone-form-item.component"; +import PhoneFormItem, { + PhoneItemFormatterValidation, +} from "../form-items-formatted/phone-form-item.component"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser @@ -26,7 +28,14 @@ export function ChatNewConversation({ openChatByPhone }) { const popContent = (
- + + PhoneItemFormatterValidation(getFieldValue, "phoneNumber"), + ]} + >