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

qcfv

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcfv - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

9

es/index.js

@@ -55,3 +55,4 @@ /*****************************************************************

chinese: /^[\u0391-\uFFE5]+$/,
percent: /^(?:[1-9][0-9]?|100)(?:\.[0-9]{1,2})?$/
percent: /^(?:[1-9][0-9]?|100)(?:\.[0-9]{1,2})?$/,
idcard: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
};

@@ -109,2 +110,6 @@

return regexs.percent.test(backVal(field));
};
var is_idcard = function is_idcard(field) {
return regexs.idcard.test(backVal(field));
}; //test的时候使用commonjs规范,module.exports = { ... }

@@ -116,2 +121,4 @@

is_empty: is_empty,
// 验证身份证
is_idcard: is_idcard,
// 验证邮箱

@@ -118,0 +125,0 @@ is_email: is_email,

@@ -62,3 +62,4 @@ "use strict";

chinese: /^[\u0391-\uFFE5]+$/,
percent: /^(?:[1-9][0-9]?|100)(?:\.[0-9]{1,2})?$/
percent: /^(?:[1-9][0-9]?|100)(?:\.[0-9]{1,2})?$/,
idcard: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
};

@@ -116,2 +117,6 @@

return regexs.percent.test(backVal(field));
};
var is_idcard = function is_idcard(field) {
return regexs.idcard.test(backVal(field));
}; //test的时候使用commonjs规范,module.exports = { ... }

@@ -123,2 +128,4 @@

is_empty: is_empty,
// 验证身份证
is_idcard: is_idcard,
// 验证邮箱

@@ -125,0 +132,0 @@ is_email: is_email,

2

package.json
{
"name": "qcfv",
"version": "1.1.1",
"version": "1.1.2",
"description": "form validator",

@@ -5,0 +5,0 @@ "main": "./es/index.js",

@@ -52,2 +52,3 @@ /*****************************************************************

percent: /^(?:[1-9][0-9]?|100)(?:\.[0-9]{1,2})?$/,
idcard:/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
}

@@ -77,8 +78,11 @@

const is_percent = function (field) {return regexs.percent.test(backVal(field));}
const is_idcard = function (field) {return regexs.idcard.test(backVal(field));}
//test的时候使用commonjs规范,module.exports = { ... }
export default {
export default {
// 验证字符串是否为空
is_empty:is_empty ,
// 验证身份证
is_idcard:is_idcard,
// 验证邮箱

@@ -85,0 +89,0 @@ is_email:is_email,

@@ -12,3 +12,6 @@ //验证的时候注意改为commonjs规范

let id = "41018219";
console.log("idcard",qcfv.is_idcard(id));
//...

Sorry, the diff of this file is not supported yet

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