From 4da70e13124f8cc34fd425ed756835779e5fb9dd Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 26 Mar 2024 15:25:31 +0100 Subject: [PATCH] fixed formadd --- src/components/FormAdd.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/FormAdd.jsx b/src/components/FormAdd.jsx index 898b090..b2f42f4 100644 --- a/src/components/FormAdd.jsx +++ b/src/components/FormAdd.jsx @@ -30,6 +30,8 @@ const options3 = [ { key: 'false', text: 'No', value: false }, ] + + const FormAdd = (props) => { const [values, setValues] = useState({}); const [errors, setErrors] = useState({}); @@ -50,9 +52,6 @@ const FormAdd = (props) => { if (!values.type) { newErrors.type = "Type obligatoire"; } - if(!values.pretable){ - newErrors.type = "Prétabilité obligatoire"; - } setErrors(newErrors); return Object.keys(newErrors).length === 0;