About
Provides an implementation of common JSON Schema string format constraints in the form of tv4 validator callbacks. Thus, it's a plug-in for tv4.
Usage
First, install it, together with tv4 itself, via Node.js'es npm into your project
$ npm install --save tv4 tv4-basic-formats
Then, in the code
var tv4 = formats = assert = validator = tv4 schema = type: 'string' format: 'date'; validator;; // Valid ISO 8601 date; // Invalid. Only 28 days in this February; // Invalid. Wrong date format
Here, the format: 'date'
part of the schema validation is provided by tv4-basic-formats
package.