For minimizing the footprint client-side, it would be helpful to be able to build a custom "build" of validator.js with just the specific validators my application needs (e.g. isEmail and isURL).
I haven't tried this, but perhaps it's as simple as commenting out some lines in src/index.js and running npm build:browser? Regardless, would be nice to see specific documented instructions for this.
I haven't look at this at all. It'd be nice to have a custom build system where you could pick and choose the functions you need, but it's a lot of work to setup and maintain. PRs are of course welcome :smile:
I'm using ES6 to import the validators/sanitizers I need for the current module, this greatly helps in minimizing the footprint, and also kudos to @chriso for making this available :smile:
For ES6 -> ES5 We use browserify.
Validator.js might be too small for this, but you could look at what lodash is doing: https://lodash.com/custom-builds
Most helpful comment
Validator.js might be too small for this, but you could look at what lodash is doing: https://lodash.com/custom-builds