Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-validate

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-validate - npm Package Compare versions

Comparing version 0.13.1 to 0.13.2

4

lib/schema.js

@@ -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();
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc