anchor

Recursive validation library with support for objects and lists

anchor

Anchor is a javascript library that lets you define strict types.

This makes it really useful for things like:

  • Form validation on the client or server
  • Ensuring compliance with an API
  • Ensuring that the proper arguments were passed into a function or command-line script
  • Validating objects before storing them in a data store
  • Normalizing polymorphic behaviors

Adds support for strongly typed arguments, like http://lea.verou.me/2011/05/strongly-typed-javascript/, but goes a step further by adding support for array and object sub-validation. It's also the core validation library for the Sails ecosystem.

(Built on top of the great work with https://github.com/chriso/validator.js)

<script type='text/javscript' src="/js/anchor.js"></script>
npm install anchor