Skip to content

Commit

Permalink
fixed formadd
Browse files Browse the repository at this point in the history
  • Loading branch information
leopoldch committed Mar 26, 2024
1 parent 7df39f0 commit 4da70e1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/FormAdd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const options3 = [
{ key: 'false', text: 'No', value: false },
]



const FormAdd = (props) => {
const [values, setValues] = useState({});
const [errors, setErrors] = useState({});
Expand All @@ -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;
Expand Down

0 comments on commit 4da70e1

Please sign in to comment.