Skip to content

Commit

Permalink
released v1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Feb 9, 2018
1 parent 560f6c3 commit c76d71c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions dist/validator.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* validator.tool v1.0.8
* validator.tool v1.0.9
* 轻量级的JavaScript表单验证,字符串验证。没有依赖,支持UMD,~3kb。
*
* Copyright (c) 2017 kenny wang <wowohoo@qq.com> (http://JSLite.io)
* Copyright (c) 2018 kenny wang <wowohoo@qq.com> (http://JSLite.io)
* http://jaywcjlove.github.io/validator.js
*
* Licensed under the MIT license.
Expand Down Expand Up @@ -232,6 +232,9 @@
var failed = false;
// 解析带参数的验证如 max_length(12)
if (parts) method = parts[1], param = parts[2];
if (isEmpty && rules.indexOf("required") === -1) {
continue;
}
if (typeof _testHook[method] === "function") {
if (!_testHook[method].apply(this, [ field, param ])) {
failed = true;
Expand Down
4 changes: 2 additions & 2 deletions dist/validator.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "validator.tool",
"version": "1.0.8",
"version": "1.0.9",
"description": "轻量级的JavaScript表单验证,字符串验证。没有依赖,支持UMD,~3kb。",
"homepage": "http://jaywcjlove.github.io/validator.js",
"main": "dist/validator.js",
Expand Down

0 comments on commit c76d71c

Please sign in to comment.