DEV Community

Discussion on: No more tears, handling Forms in React using Formik, part I

Collapse
 
lthebaultsw profile image
Loïc Thebault • Edited

There is an error on the validation snippet


validate={values => {
let errors = {};
if(!errors.name) {
errors.name = 'Name is required';
}
return errors;
}}

It's should be !values.name instead of !errors.name

Collapse
 
softchris profile image
Chris Noring

of course it should.. thank you :)