Skip to content

Commit

Permalink
Always evaluate on init
Browse files Browse the repository at this point in the history
  • Loading branch information
danpalmer committed Dec 12, 2014
1 parent 12fa583 commit 56f5628
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions jquery.complexify.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@
minimumChars: 8,
strengthScaleFactor: 1,
bannedPasswords: window.COMPLEXIFY_BANLIST || [],
banmode: 'strict', // (strict|loose)
evaluateOnInit: true
banmode: 'strict' // (strict|loose)
};

if($.isFunction(options) && !callback) {
Expand Down Expand Up @@ -177,11 +176,9 @@
callback.call(this, valid, complexity);
}

if( options.evaluateOnInit ) {
this.each(function () {
evaluateSecurity.apply(this);
});
}
this.each(function () {
evaluateSecurity.apply(this);
});

return this.each(function () {
$(this).bind('keyup focus input propertychange mouseup', evaluateSecurity);
Expand Down

0 comments on commit 56f5628

Please sign in to comment.