diff --git a/schema/validator.js b/schema/validator.js index 40b2e099..5e5f9174 100644 --- a/schema/validator.js +++ b/schema/validator.js @@ -2,7 +2,9 @@ var Ajv = require('ajv'); var ajv = new Ajv({allErrors: true}); module.exports = function validate(schema, data) { - var ajv = new Ajv(); + var ajv = new Ajv({ + errorDataPath: 'property' + }); var isValid = ajv.validate(schema, data); if(!isValid) { diff --git a/test/extract.test.js b/test/extract.test.js index fe1fdf91..8395b262 100644 --- a/test/extract.test.js +++ b/test/extract.test.js @@ -29,7 +29,7 @@ describe("ExtractTextPlugin.extract()", function() { ExtractTextPlugin.extract({style: 'file.css'}); }, function(err) { - return err.message === 'data should NOT have additional properties'; + return err.message === 'data[\'style\'] should NOT have additional properties'; } ); });