4 ms·
We've been rebuilding a major app in Node and searching for validation solutions that would support async. Embarrassingly, very few Node validation libraries s
by ericclemmons 12y ago
We've been rebuilding a major app in Node and searching for validation solutions that would support async.
Embarrassingly, very few Node validation libraries support async!
This makes it annoyingly complex to have multiple sets of validation on the server to ensure a new user is indeed a new user, that foreign keys match their constraints, etc. on top of the dumb type checks.
We ultimately found Schemator from the js-data project:
> http://www.js-data.io/v1.5.8/docs/js-data-schema http://www.js-data.io/v1.5.8/docs/js-data-schema
We've been able to put all of our sync/async constraints into varying "schemas" that run on both the client and the server!