@@ -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}