Closed tifidy closed 9 years ago
How are you installing and using it with npm? I just tried and it works fine..
npm install validatorjs
Then inside test.js:
var Validator = require('validatorjs');
var v = new Validator({ username: 'blah' }, { username: 'min:15' });
console.log(v.passes(), v.errors.first('username'));
Running it... node test
Oo wow I made a silly mistake.., pitty of me trying to install "validatejs" instead "validatorjs"..
It all works just fine now. To tell the truth, I started using "laravel" because of its beutiful validation class. Now I can do that in javascript great!
I am sort of new to nodejs.. I tried installing this package both global and local and none of them work. So I ended up copying the js file in your /dist folder in github and require it to get it work. But that way I cant get the new commits from you guys. Whats the problem with npm?
By the way I specifically put the keywords on google as "laravel like nodejs validation". You guys came up! awesome job!