async-validator
Advanced tools
Comparing version 1.6.8 to 1.6.9
@@ -24,3 +24,4 @@ 'use strict'; | ||
var pattern = { | ||
email: /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/, | ||
// http://emailregex.com/ | ||
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, | ||
url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'), | ||
@@ -27,0 +28,0 @@ hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i |
@@ -11,3 +11,2 @@ 'use strict'; | ||
exports.warning = warning; | ||
exports.format = format; | ||
@@ -21,8 +20,13 @@ exports.isEmptyValue = isEmptyValue; | ||
var warning2 = function warning2() {}; | ||
var warning = exports.warning = function warning() {}; | ||
if (process.env.NODE_ENV !== 'production') { | ||
warning2 = function warning2(type, message) { | ||
// don't print warning message when in production env or node runtime | ||
if (process.env.NODE_ENV !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') { | ||
exports.warning = warning = function warning(type, errors) { | ||
if (typeof console !== 'undefined' && console.warn) { | ||
console.warn(type, message); | ||
if (errors.every(function (e) { | ||
return typeof e === 'string'; | ||
})) { | ||
console.warn(type, errors); | ||
} | ||
} | ||
@@ -32,11 +36,2 @@ }; | ||
function warning(type, errors) { | ||
// only warn native warning, default type is string, confuses many people... | ||
if (errors.every(function (e) { | ||
return typeof e === 'string'; | ||
})) { | ||
warning2(type, errors); | ||
} | ||
} | ||
function format() { | ||
@@ -43,0 +38,0 @@ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { |
{ | ||
"name": "async-validator", | ||
"version": "1.6.8", | ||
"version": "1.6.9", | ||
"description": "validate form asynchronous", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
58664
1205