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.8.1 to 1.8.2

4

es/rule/pattern.js

@@ -17,2 +17,6 @@ import * as util from '../util';

if (rule.pattern instanceof RegExp) {
// if a RegExp instance is passed, reset `lastIndex` in case its `global`
// flag is accidentally set to `true`, which in a validation scenario
// is not necessary and the result might be misleading
rule.pattern.lastIndex = 0;
if (!rule.pattern.test(value)) {

@@ -19,0 +23,0 @@ errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));

@@ -27,2 +27,6 @@ 'use strict';

if (rule.pattern instanceof RegExp) {
// if a RegExp instance is passed, reset `lastIndex` in case its `global`
// flag is accidentally set to `true`, which in a validation scenario
// is not necessary and the result might be misleading
rule.pattern.lastIndex = 0;
if (!rule.pattern.test(value)) {

@@ -29,0 +33,0 @@ errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));

2

package.json
{
"name": "async-validator",
"version": "1.8.1",
"version": "1.8.2",
"description": "validate form asynchronous",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc