Kavie
Kavie is a small and easy to use knockout js validation library.
Installation
You can download kavie from npm
npm install kavie
Then include it in your project after knockout js
<!-- Promise Polyfill for IE11 and Android support (only used with async validation) -->
it can also be included via node modules
var ko = ;var Kavie = ;
Usage
{ var self = this; selfvalue = ko; self{ if Kavie console; }}
Html Side
Kavie works by adding a hasError variable to the observable. This gives the flexibility to add color changing to any element you want
Uh Oh! There was an error!
Validation Messages
You can use a validation message to display to the user if the validation failed
These validation messages are stored on the validators see custom rules for more information
Validation rules
There are a few validation rules build in
selfvalue = ko;
It is important to note that on the date, birthdate, phone, email, and numeric validators, if the users input is null, undefined, or empty they will return true. This is so you can still have optional values and use these validators. If you want them required, add the required validator.
More Features
There is much more to kavie, but in order to keep the readme simple the advanced features have been moved to the wiki
Problems?
Thanks of taking a look at kavie. If you have any problems let me know and I would love to help you out