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

A way to remove errors without rolling back #361

Open
alexborovkov opened this issue Aug 2, 2019 · 4 comments
Open

A way to remove errors without rolling back #361

alexborovkov opened this issue Aug 2, 2019 · 4 comments

Comments

@alexborovkov
Copy link

Is there some way to clear errors without rollback in changeset? I've faced the same issue as here #282

@snewcomer
Copy link
Collaborator

snewcomer commented Oct 1, 2019

👋 What version are you on? I'm guessing rollbackProperty/rollbackInvalid doesn't work for you? Do you want to clear all errors?

#307

@theroncross
Copy link

I would also like to see this added. Use-case is as follows:

I have a fieldset of checkboxes, with at least one required, and each value included in the changeset. User deselects all checkboxes. On the last checkbox, the validation adds an error for that key. Now user re-selects another checkbox. Validation passes, but doesn't remove the error.

@MichalBryxi
Copy link

Chiming in with our use-case: We do a lot of manual stuff, because ... reasons. At one point we figure out that validation errors on all the fields are not true anymore and should be cleared. Not the values, just the errors.
I don't think anything from the existing API covers that.

@MichalBryxi
Copy link

I think this trick should work around the problem before we have proper support:

for (const errKey in this.changeset._errors) {
  this.changeset.addError(errKey); // no second argument effectively clears the error
}

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

4 participants