npm.io
0.0.2 • Published 11 years ago

knockout-validations-error-handler

Licence
MIT
Version
0.0.2
Deps
3
Vulns
7
Weekly
0

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"}
  • 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

Keywords