Skip to content

MRValidate - Bind API errors to a knockout model

License

Notifications You must be signed in to change notification settings

GlassUmbrella/mrvalidate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mrvalidate

Easily bind errors returned from an API to a knockout model

Docs

  1. Call .makeValidatable() on knockout observables
  2. When API call failed pass errors to applyValidationErrorsToModel() passing in the view model
  3. To reset call clearValidationErrorsToModel() passing in the view model

Install

bower install mrvalidate --save