Re:Xtypejs: data validation for JavaScript Apps
by lucono on Wednesday July 01, 2015 @03:57AM
(#9810514)
Thanks to lots of great community feedback and input, xtypejs now has a home at [http://xtype.js.org](http://xtype.js.org), with great documentation, user guide, and lots of examples.
Re:Xtypejs: data validation for JavaScript Apps
by o_____________o on Wednesday July 01, 2015 @01:05PM
(#9813401)
Lately I've been using the JSON schema format to validate. It's powerful and clean. We've paired it with RAML to validate everything from the URL parameters, POST bodies, response bodies, etc.
Re:Xtypejs: data validation for JavaScript Apps
by lucono on Wednesday July 01, 2015 @03:14PM
(#9814420)
There is a non-open-source JavaScript decorator library using this. It has many (real) examples, but the one that first comes to mind is its use of the xtype.is API method (http://xtype.js.org/api/is) to perform runtime validations based on validation meta-data that's defined in configuration.
http://json-schema.org/ https://github.com/zaggino/z-schema
Go from this:
To concise, performant, readable, data validation:For an idea of what that looks like, see:
http://xtype.js.org/guide/checking_combinations_of_types