Socket
Socket
Sign inDemoInstall

async-validator

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-validator - npm Package Compare versions

Comparing version 1.6.7 to 1.6.8

LICENSE.md

2

lib/rule/required.js

@@ -25,3 +25,3 @@ 'use strict';

function required(rule, value, source, errors, options, type) {
if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type))) {
if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {
errors.push(util.format(options.messages.required, rule.fullField));

@@ -28,0 +28,0 @@ }

@@ -83,3 +83,3 @@ 'use strict';

function isNativeStringType(type) {
return type === 'string' || type === 'url' || type === 'hex' || type === 'email';
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
}

@@ -86,0 +86,0 @@

{
"name": "async-validator",
"version": "1.6.7",
"version": "1.6.8",
"description": "validate form asynchronous",

@@ -5,0 +5,0 @@ "keywords": [

@@ -330,3 +330,3 @@ # async-validator

}).then(function(data){
callback(null);
callback();
},function(error){

@@ -357,2 +357,2 @@ callback(new Error(error))

Everything is [MIT](http://en.wikipedia.org/wiki/MIT_License).
Everything is [MIT](http://en.wikipedia.org/wiki/MIT_License).
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