Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
The-Code-Monkey opened this issue Jun 12, 2018 · 0 comments
Open

Comments

@The-Code-Monkey
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant