async-validate
Advanced tools
Comparing version 0.13.1 to 0.13.2
@@ -97,2 +97,4 @@ var iterator = require('./iterator') | ||
opts.messages = opts.messages || this.messages(); | ||
var series = [] | ||
@@ -108,3 +110,3 @@ , k | ||
// configure messages to use defaults where necessary | ||
, messages = opts.messages || this.messages(); | ||
, messages = opts.messages; | ||
@@ -111,0 +113,0 @@ for(k in fields) { |
{ | ||
"name": "async-validate", | ||
"description": "Asynchronous validation for node and the browser", | ||
"version": "0.13.1", | ||
"version": "0.13.2", | ||
"author": "muji <noop@xpm.io>", | ||
@@ -19,13 +19,12 @@ "license": "MIT", | ||
"dependencies": { | ||
"format-util": "~1.0.2", | ||
"zephyr": "~1.3.2" | ||
"format-util": "~1.0.3", | ||
"zephyr": "~1.3.5" | ||
}, | ||
"devDependencies": { | ||
"async": "~1.4.2", | ||
"browserify": "~11.1.0", | ||
"chai": "~3.2.0", | ||
"coveralls": "~2.11.6", | ||
"istanbul": "~0.3.17", | ||
"mocha": "~2.3.2", | ||
"moment": "~2.10.6" | ||
"browserify": "~13.0.0", | ||
"chai": "~3.5.0", | ||
"coveralls": "~2.11.9", | ||
"istanbul": "~0.4.3", | ||
"mocha": "~2.4.5", | ||
"moment": "~2.12.0" | ||
}, | ||
@@ -32,0 +31,0 @@ "scripts": { |
@@ -59,2 +59,13 @@ var expect = require('chai').expect | ||
it('should validate using custom messages as option', function(done) { | ||
// assign updated messages to the Schema | ||
var schema = new Schema(override, {messages: clone}); | ||
schema.validate({}, function(err, res) { | ||
expect(res.errors.length).to.eql(1); | ||
expect(res.errors[0].message).to.eql('name is a required field'); | ||
done(); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
218283
6
4606
Updatedformat-util@~1.0.3
Updatedzephyr@~1.3.5