formik validate on click code example
Example: what triggers formik validate
const Input = ({ field, form }) => {
useEffect(() => {
form.validateForm();
}, []);
return (
{form.errors[field.name] && (
{form.errors[field.name]}
)}
);
};