Added phone validation + new phone input box IO-414
This commit is contained in:
@@ -3,7 +3,9 @@ import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
||||
import FormItemPhone from "../form-items-formatted/phone-form-item.component";
|
||||
import FormItemPhone, {
|
||||
PhoneItemFormatterValidation,
|
||||
} from "../form-items-formatted/phone-form-item.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
|
||||
export default function OwnerDetailFormComponent({ form, loading }) {
|
||||
@@ -118,7 +120,14 @@ export default function OwnerDetailFormComponent({ form, loading }) {
|
||||
>
|
||||
<FormItemEmail email={getFieldValue("ownr_ea")} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("owners.fields.ownr_ph1")} name="ownr_ph1">
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_ph1")}
|
||||
name="ownr_ph1"
|
||||
rules={[
|
||||
({ getFieldValue }) =>
|
||||
PhoneItemFormatterValidation(getFieldValue, "ownr_ph1"),
|
||||
]}
|
||||
>
|
||||
<FormItemPhone customInput={Input} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
|
||||
Reference in New Issue
Block a user