diff --git a/frontend/src/components/intake/ProgramForm.tsx b/frontend/src/components/intake/ProgramForm.tsx index 72d34caf7..a1a2446c6 100644 --- a/frontend/src/components/intake/ProgramForm.tsx +++ b/frontend/src/components/intake/ProgramForm.tsx @@ -186,7 +186,7 @@ const ProgramForm = ({ type="string" placeholder="DD/MM/YYYY" icon={} - validate={validateDate} + validate={(value: string) => validateDate(value)} /> {dateOfBirthError && (
{dateOfBirthError}
diff --git a/frontend/src/components/intake/ReferralForm.tsx b/frontend/src/components/intake/ReferralForm.tsx index 9cd836e30..ceded2e97 100644 --- a/frontend/src/components/intake/ReferralForm.tsx +++ b/frontend/src/components/intake/ReferralForm.tsx @@ -73,10 +73,8 @@ const ReferralForm = ({ }); }; - const [ - referringWorkerContactError, - setreferringWorkerContactError, - ] = useState(null); + const [referringWorkerContactError, setreferringWorkerContactError] = + useState(null); const [refferalDateError, setRefferalDateError] = useState( null, ); @@ -154,7 +152,7 @@ const ReferralForm = ({ type="string" placeholder="(e.g. 555-555-5555, ext. 123)" icon={} - validate={validatePhone} + validate={(value: string) => validatePhone(value)} /> {referringWorkerContactError && (
@@ -208,7 +206,7 @@ const ReferralForm = ({ type="string" placeholder="DD/MM/YYYY" icon={} - validate={validateDate} + validate={(value: string) => validateDate(value)} /> {refferalDateError && (
{refferalDateError}
diff --git a/frontend/src/components/intake/child-information/AddChildPage.tsx b/frontend/src/components/intake/child-information/AddChildPage.tsx index 23d895025..3845e7269 100644 --- a/frontend/src/components/intake/child-information/AddChildPage.tsx +++ b/frontend/src/components/intake/child-information/AddChildPage.tsx @@ -57,10 +57,8 @@ const AddChild = ({ }); const [providers, setProviders] = useState([]); const [childInfoDateError, setChildInfoDateError] = useState(false); - const [ - childInfoSchoolPhoneNoError, - setChildInfoSchoolPhoneNoError, - ] = useState(false); + const [childInfoSchoolPhoneNoError, setChildInfoSchoolPhoneNoError] = + useState(false); const requiredInfomationMissing: boolean = !childDetails.childName || diff --git a/frontend/src/components/intake/child-information/ChildInformationForm.tsx b/frontend/src/components/intake/child-information/ChildInformationForm.tsx index 13950a33c..389894656 100644 --- a/frontend/src/components/intake/child-information/ChildInformationForm.tsx +++ b/frontend/src/components/intake/child-information/ChildInformationForm.tsx @@ -92,7 +92,7 @@ const ChildInformationForm = ({ dateOfBirth: e.target.value, }) } - validate={validateDate} + validate={(value: string) => validateDate(value)} /> {dateOfBirthError && (
{dateOfBirthError}
diff --git a/frontend/src/components/intake/child-information/SchoolDaycareForm.tsx b/frontend/src/components/intake/child-information/SchoolDaycareForm.tsx index e66411fce..6f67903be 100644 --- a/frontend/src/components/intake/child-information/SchoolDaycareForm.tsx +++ b/frontend/src/components/intake/child-information/SchoolDaycareForm.tsx @@ -97,7 +97,7 @@ const SchoolDaycareForm = ({ schoolPhoneNo: e.target.value, }) } - validate={validatePhone} + validate={(value: string) => validatePhone(value)} /> {schoolPhoneNoError && (
{schoolPhoneNoError}