esbenp / esbenp/react-native-clean-form

How to tell if validate has no errors and stop the form submit.

Open
#88 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
472
Forks
74
PR merge metrics
No merged PRs in 30d

Description

`const submit = (values, dispatch) => {
const promise = new Promise((resolve) => {
resolve();
});
console.warn(promise);
};`

I have that as my form submit how do i work out if any of these have errored

`validate: (values) => {
const errors = {};

if (values.test === 0) {
errors.test = "test erroring"
}

return errors;
};`

i just want to do it as its a form that gets a specific form based on the fields here and i need them all to be able to submit

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.