Open ribbedcrown opened 9 years ago
If don't know if in your case is it needed however it may be good feature to implement. I will probably add it in the near future. However, right now you can do it using some internal API.
form._errors.set('fieldName', 'Error message');
Right now all error messages are related with some field name. However I will be working on implementing field errors and document errors. Where document errors will be related with entire document, not particular field.
Thank you, @jagi, this is what I need! Document errors looks useful for work with error summaries. It'll be cool feature.
It`ll be useful for example for Meteor Accounts error displaying:
where
form
isAstro.Class
instance.Maybe something similar to Simple Schema`s
validationContext.addInvalidKeys(errors)
.P.S. Great work, many thanks!