This is very cool, but I highly recommend using a standard like JSON schema instead. It will make your life easier long term. The initial hurdle of learning may be harder, but lots of libraries/languages support JSON schema.
Very nice API. I do have a question, and not to be dismissive, but is there a strong reason to use Forg over Validatejs. The APIs are pretty similar so I don't know what I would choose Forg over ValidateJS.
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.
Thank you, i tried to fix typos but im sure some are left.
I dont think that there is a strong reason, I just wanted a modern lightweight validation library where rules are easy to write and closer to buisness rules
Out of curiosity, why have a singular Rule class that has a type (with internal branching logic based on that field), rather than separate Rule classes for each type of Rule, with Rule being a base class that users can extend to define their own rules?
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