You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which format is acceptable? Array? Object?
I tried everything.
So, I have a big form on top of pages, so in order to go to the next screen with other inputs, i am validating the current screen. So how can I validate only specific values?
const _onClick = (validateForm, direction, setTouched) => {
const index = choosePage(direction);
console.log(SCREEN_INPUTS[screen]);
validateForm([SCREEN_INPUTS[CURRENT_SCREEN]]).then((data) => {
if (direction === directions.next) {
// Set touched all invalid inputs in order to show tooltips
if (screenIsInvalid(data)) {
console.log(data);
return setTouched(data, true);
}
return switchPage({ data, index });
}
// Direction is prev, don't need to show errors if it was untouched
return switchPage({ data: null, index });
});
};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
validateForm: (values?: any) => Promise<FormikErrors>
Which format is acceptable? Array? Object?
I tried everything.
So, I have a big form on top of pages, so in order to go to the next screen with other inputs, i am validating the current screen. So how can I validate only specific values?
Beta Was this translation helpful? Give feedback.
All reactions