文件名称:Simple-Validator:一个简单的Node.js数据验证框架
文件大小:3KB
文件格式:ZIP
更新时间:2024-05-22 06:13:32
JavaScript
Simple-Validator A simple data validation framework for Node.js How to use require the validator module var Validator = require('./validator') Constructs a validator var validator = new Validator({ name: { type: 'string', required: '用户名不能为空', err: '用户名长度4到16个字符', regexp: /^\w{4,16}$/ }, email: { type: 'email',
【文件预览】:
Simple-Validator-master
----validator.js(3KB)
----test.js(749B)
----README.md(826B)
----testuser.js(1KB)