
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
form-verify
Advanced tools
统一的表单验证方式实现
$ npm install --save form-verify
var verify = require('form-verify');
//verify.js不干预dom和样式,不提供默认提示,只做纯校验过程。
//注:不兼容ie7
//使用方式:
var v = verify({
type:'single',//multi
trim:false,//可选
data:vue//可选 vue/angular等
},
[
{
value:val,
el:'dom',
model:'model',
isEmpty:'用户名不能为空',
minLength:'密码长度不小于6位&6',
maxLength:'密码长度最大12位&12',
length:'密码长度在6-12位&6-12',
isMobile:'手机号不正确',
custom:['&==2','错误-不等于2']
}
]);
//返回:
'single' //返回验证结果及单条错误信息。
'multi' //返回验证结果及多条错误信息,并设置dom。
'data:vue/angular' //返回验证结果及错误信息,并设置model。
- 使用new重构verify.js
- 修复ie8下的trim、filter等报错
- 发布至github及npm(form-verify)
- 支持单条和多条错误提示,并设置dom
- 支持vue/angular等配合使用
FAQs
We found that form-verify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.