diff --git a/src/pages/ClientsPage/modals/ClientFormModal/ClientFormModal.tsx b/src/pages/ClientsPage/modals/ClientFormModal/ClientFormModal.tsx index dcddb43..cdc35f2 100644 --- a/src/pages/ClientsPage/modals/ClientFormModal/ClientFormModal.tsx +++ b/src/pages/ClientsPage/modals/ClientFormModal/ClientFormModal.tsx @@ -2,7 +2,6 @@ import {ContextModalProps} from "@mantine/modals"; import {Fieldset, TextInput} from "@mantine/core"; import {useForm} from "@mantine/form"; import {ClientSchema} from "../../../../client"; -import {getDigitsCount} from "../../../../shared/lib/utils.ts"; import BaseFormModal, {CreateEditFormProps} from "../BaseFormModal/BaseFormModal.tsx"; @@ -38,12 +37,12 @@ const ClientFormModal = ({ initialValues: initialValues, validate: { name: (name: string) => name.trim() !== '' ? null : "Необходимо ввести название клиента", - details: { - telegram: (address: string | undefined | null) => (address && address.trim() !== '') ? null : "Необходимо ввести телеграм", - phoneNumber: (phoneNumber: string | undefined | null) => (phoneNumber && phoneNumber.trim() !== '') ? null : "Необходимо ввести номер телефона", - email: (email: string | undefined | null) => (email && email.trim() !== '') ? null : "Необходимо ввести почту", - inn: (inn: string | undefined | null) => (inn && getDigitsCount(parseInt(inn)) >= 10) ? null : "ИНН должен содержать не менее 10 цифр", - } + // details: { + // telegram: (address: string | undefined | null) => (address && address.trim() !== '') ? null : "Необходимо ввести телеграм", + // phoneNumber: (phoneNumber: string | undefined | null) => (phoneNumber && phoneNumber.trim() !== '') ? null : "Необходимо ввести номер телефона", + // email: (email: string | undefined | null) => (email && email.trim() !== '') ? null : "Необходимо ввести почту", + // inn: (inn: string | undefined | null) => (inn && getDigitsCount(parseInt(inn)) >= 10) ? null : "ИНН должен содержать не менее 10 цифр", + // } } }) @@ -70,25 +69,21 @@ const ClientFormModal = ({