const {values, handleChange, handleSubmit, errors} = useFormik({
initialValues: {
name: '',
address: '',
latitude: '',
longitude: '',
nit: '',
category: '',
email: '',
},
validationSchema: {formSchema},
validateOnChange: false,
onSubmit: () => console.log(values),
})
En: The error occurs because we are surrounding the validation schema with keys, we must pass it without keys, keep in mind the validateOnchange.
Es: El error ocurre porque estamos rodeando el esquema de validación con llaves, debemos pasarlo sin llaves, tener presente el validateOnchange