lib/heimdallr-validator.js
function validateData(data, schema, fn) {
        debug('Schema:', schema);
        debug('Data:', data);

        if (!tv4.validate(data, schema)) {
            return fn(tv4.error);
        }

        return fn(null, true);
    }
function validateData(data, schema, fn) {
        debug('Schema:', schema);
        debug('Data:', data);

        if (!tv4.validate(data, schema)) {
            return fn(tv4.error);
        }

        return fn(null, true);
    }
function validateData ( data , schema , fn ) { debug ( 'Schema:' , schema ) ; debug ( 'Data:' , data ) ; if ( ! tv4 . validate ( data , schema ) ) { return fn ( tv4 . error ) ; } return fn ( null , true ) ; }
Verifies that the data conforms to the schema.

@arg {} data - The data to validate.
@arg {object} schema - Valid JSON schema.
@arg {function} fn - Node-style callback that will be passed an error
as the first argument if the packet is invalid.
Verifies that the data conforms to the schema .