ValidateJS
Javascript数据校验工具
Install / Use
/learn @xiaohaijoe/ValidateJSREADME
TimelineValidate
TimelineValidate是一个基于node.js数据验证器,提供了丰富的类型校验,只需简单的几行,就可以完成数据校验<br> 不管是node.js后台开发,还是web前端开发,都可以使用该验证器进行数据校验。
主要特性:
- 提供丰富的验证规则
- 可自定义规则
- 提供静态调用方法
使用方法:
- cnpm install
- npm run dev
说明文档
https://github.com/xiaohaijoe/TimelineValidate/wiki/TimelineValidate-Document
基本使用
let rule =[
['name', 'require|max:25'],
['email', 'email']
]
let validate = new Validate(rule);
let data = {
'name': 'hello world',
'email': 'hijack@xiaohaijoe.com'
}
if (!validate.check(data)) {
console.log(validate.getError());
}
更多介绍请查看说明文档。
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
