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