Questions:
Is touched prop run on react native?
@aligos I guess that code should do the work:
<TextInput
onChangeText={(text) => setFieldValue('email', text)}
value={values.email}
onBlur={() => setFieldTouched('email')}
/>
{errors.email && touched.email &&
<Text>Error!</Text>
}
@artem-romanov But doing onBlur={() => props.setFieldTouched('fieldName')} makes my onSubmitEditing={props.handleSubmit} not working. On the web, upon pressing _"Enter"_ while I'm typing in the <Input /> field does submit the form no more with that onBlur.
Most helpful comment
@aligos I guess that code should do the work: