【文件属性】:
文件名称:virtual-form-validation:[WIP]使用JSON模式验证虚拟表单
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-11 14:45:05
JavaScript
虚拟形式验证
使用JSON模式验证虚拟表单。
安装
$ npm install virtual-form-validation
用法
const validator = require ( 'virtual-form-validation' )
const validate = validator ( {
type : 'object' ,
additionalProperties : false ,
required : [ 'name' ] ,
properties : {
name : { type : 'string' } ,
address : { type : 'string' }
}
} )
module . exports = render
function render ( h , state ) {
return h ( 'fo
【文件预览】:
virtual-form-validation-master
----.travis.yml(152B)
----index.js(173B)
----test.js(172B)
----package.json(870B)
----LICENSE(1KB)
----.gitignore(54B)
----README.md(2KB)