adopted-ember-addons / validated-changeset

Buffering changes to form data
MIT License
36 stars 27 forks source link

Missing documentation on removeError and removeErrors #170

Open MichalBryxi opened 2 years ago

MichalBryxi commented 2 years ago

While going through the READM on ember-changeset we noticed following lines:

    try {
      await this.changeset.validate((changes) => FormSchema.validate(changes));
      this.changeset.removeError(path); // << what is this method?
    } catch (e) {
      this.changeset.addError(e.path, { value: this.changeset.get(e.path), validation: e.message });
    }

We tried to look for said function in ember-changeset repo, but apart from README and test, there were no results. Then we found out that said method is actually defined on validated-changeset.

But even the README of validated-changeset does not mention this method. By looking at the other methods of the validated.ts file, it seems like validated-changeset README is missing the documentation on removeError and removeErrors?

MichalBryxi commented 2 years ago

I'm happy to raise a PR, just making sure this is an actual issue.