ForgJs – A lightweight object validator
github.com
github.com
If you are using typescript, I highly recommend using a generator to create JSON schema definitions. This one has worked really well recently https://github.com/YousefED/typescript-json-schema
Some things to address:
* Typescript definitions
* ES/6 import documentation
* There are a lot of tiny typos in the readme, it would make sense to spell check that.
Thanks for the contribution.
new Validator = ({ age: 'int 22-48' });
If memory serves you can parse that type of string in the Validator constructor and insert the Rule structures you already have in place of it.
Here is some sample https://gist.github.com/nmarley/afe61a36f71ed1e4a9728c0f5f6f...