knockout-validations-error-handler
v0.0.2
Published
To be used with knockout-validations-extender, it simply adds manual errors into observables.
Downloads
697
Maintainers
Readme
knockout validations error handler
A small function that will grab given errors and insert into an observable that uses extender knockout-validations-extender.
Uses feature manualErrors from that extender.
Params
- errors
- array of error object (has path, has message). Eg:
{"path": "consumer.id", message: "notNull"}
- array of error object (has path, has message). Eg:
- givenObservable
- observable that extends knockout-validations-extender
- [translateMessage]
- function that receives a key, can return a translation of a message
Change log
- 0.0.2 -- fixed when accessing array paths, eg: consumers[0].id