lib/validator.js
function getErrorMessage(errors) {
    var fullMessage = '';
    errors.forEach(function (err) {
        var message = ajv.errorsText([err]);
        if (message.indexOf('should NOT have additional properties') < 0) {
            fullMessage += message + os.EOL;
        }
        else {
            fullMessage += message + '. Offending property : ' + err.params.additionalProperty + os.EOL;
        }
    });
    return fullMessage;
}
function getErrorMessage(errors) {
    var fullMessage = '';
    errors.forEach(function (err) {
        var message = ajv.errorsText([err]);
        if (message.indexOf('should NOT have additional properties') < 0) {
            fullMessage += message + os.EOL;
        }
        else {
            fullMessage += message + '. Offending property : ' + err.params.additionalProperty + os.EOL;
        }
    });
    return fullMessage;
}
function getErrorMessage ( errors ) { var fullMessage = '' ; errors . forEach ( function ( err ) { var message = ajv . errorsText ( [ err ] ) ; if ( message . indexOf ( 'should NOT have additional properties' ) < 0 ) { fullMessage += message + os . EOL ; } else { fullMessage += message + '. Offending property : ' + err . params . additionalProperty + os . EOL ; } } ) ; return fullMessage ; }
Gets a human readable error message from the ajv errors object, using the ajv.errorsText and some custom logic
@param {Object[]} errors the ajv.errors object
@returns {String} The human readable error message
@see Ajv.ajv.errorsText
@private
Gets a human readable error message from the ajv errors object using the ajv . errorsText and some custom logic