lukejagodzinski / meteor-astronomy-validators

https://atmospherejs.com/jagi/astronomy-validators
MIT License
11 stars 13 forks source link

How to clear validation errors manually? #22

Closed tsega closed 8 years ago

tsega commented 8 years ago

Is there a way to manually clear validation errors? It looks like the _errors property holds the errors but setting that to null results in an error.

lukejagodzinski commented 8 years ago

The _errors property is reactive and you can't set it to null. Instead you have to call clear() method doc._errors.clear(). However, I think it should be a method on the document level like: doc.clearValidationErrors() or something like that.

tsega commented 8 years ago

Thanks @jagi, that worked like a charm! :+1:

lukejagodzinski commented 8 years ago

No problem :). I've already implemented the doc.clearValidationErrors() method that will appear in the next release (in about one month from now, in two weeks pre release version).