Skip to content

Commit

Permalink
Update validate.js
Browse files Browse the repository at this point in the history
Suggestion: pass the field object to support custom rules on checkboxes and radios
  • Loading branch information
mkanev committed Apr 22, 2014
1 parent e7de2b1 commit f97b970
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,2 +1,4 @@
.DS_Store
index.html

/.idea
2 changes: 1 addition & 1 deletion validate.js
Expand Up @@ -315,7 +315,7 @@
method = method.substring(9, method.length);

if (typeof this.handlers[method] === 'function') {
if (this.handlers[method].apply(this, [field.value, param]) === false) {
if (this.handlers[method].apply(this, [field.value, param, field]) === false) {
failed = true;
}
}
Expand Down

0 comments on commit f97b970

Please sign in to comment.