1 Star 0 Fork 0

冬瓜 / dg-validator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

[新增] int 和 float 增加 multiple 字段,验证是否为某值的倍数

0.1.0

[新增] allowNull 字段,允许 null 值,仅 json 格式支持,仅拥有 ctx 后端支持
[新增] placeholder 字段在免检字段中

0.0.7

调整 array 方法的验证不规范,和错误提示    
[新增] test 测试文件

0.0.6

如果是空参数(空字符串),在 rule.string = true 规则成立时会设置为 '', 其他情况下会以 undefined 处理 在 int float 等与 length 混用时,若验证失败应该返回更为精确的错误信息 - 以增加规则,但是需要修改字符串

0.0.5

增加 - dateRange 增加 - datetimeRange

0.0.4

调整 - 调整 date 的规则 新增 - 新增 time 的规则 新增 - 新增 datetime 的规则

0.0.3

修复 array 方式验证引发的错误

0.0.2

修复 regexp 方式验证引发的错误

0.0.1

表单验证插件,支持前端、后端(koa体系)验证

// TODO children 验证方式无效 // TODO array 不支持 , 隔开的字符串格式

MIT License Copyright (c) 2021 dgteam.cn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/2681137811/dg-validator.git
git@gitee.com:2681137811/dg-validator.git
2681137811
dg-validator
dg-validator
master

搜索帮助