Skip to content

Commit

Permalink
Fix bad inure. #7
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 27, 2017
1 parent db3edcb commit dcef3ac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ var Validator = function(formelm, fields, callback){
// 将验证方法绑到 Validator 对象上去
for (var a in _testHook) this[camelCase(a)] = _testHook[a];

this.isCallback = callback?true:false;
this.callback = callback || function(){};
this.form = _formElm(formelm) || {};
this.errors = [];
Expand Down Expand Up @@ -188,7 +187,7 @@ Validator.prototype = {
return field.display.split('|')[i] && field.display.split('|')[i].replace('{{'+field.name+'}}',field.value)
})()

var existingError;
var existingError,j;
for (j = 0; j < this.errors.length; j += 1) {
if (field.element === this.errors[j].element) {
existingError = this.errors[j];
Expand Down

0 comments on commit dcef3ac

Please sign in to comment.