tgriesser / checkit

simple, flexible validations for node and the browser
MIT License
223 stars 53 forks source link

Enable check nested key with '.' #22

Closed muddydixon closed 10 years ago

muddydixon commented 10 years ago

This change enables to check the key with "." from nested object. Thus we can check bellow:

var target = {info: {email: "joe@gmail.com"}};
new Checkit({
  "info.email": ["required", "email"]
}).run(target); // => ok
tgriesser commented 10 years ago

Neat, thanks

muddydixon commented 10 years ago

thx!