Skip to content

Commit

Permalink
Incorporated JSCS linting
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhiam committed Jul 11, 2017
1 parent 4f40bb5 commit 53d7c2a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/core.js
Expand Up @@ -436,14 +436,15 @@ $.extend( $.validator, {

checkForm: function() {
this.prepareForm();
for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) {

//Fix validation for name array within form
if (this.findByName( elements[i].name ).length != undefined && this.findByName( elements[i].name ).length > 1) {
for (var cnt = 0; cnt < this.findByName( elements[i].name ).length; cnt++) {
this.check( this.findByName( elements[i].name )[cnt] );
if ( this.findByName( elements[ i ].name ).length !== undefined && this.findByName( elements[ i ].name ).length > 1 ) {
for ( var cnt = 0; cnt < this.findByName( elements[ i ].name ).length; cnt++ ) {
this.check( this.findByName( elements[ i ].name )[ cnt ] );
}
} else {
this.check( elements[i] );
this.check( elements[ i ] );
}
}
return this.valid();
Expand Down

0 comments on commit 53d7c2a

Please sign in to comment.