function validatePassword(password, failureCallback) {
    if (passwordRegex.test(password) && checkLength(password, 5, 16)) {
      return true;
    } else {
      if (failureCallback && typeof(failureCallback) === "function") {
        failureCallback(this.getPasswordAllowedChars());
      }
      return false;
    }
  }
/**
    * Tests the string against the allowed chars regex
    *
    * @public
    * @method validatePassword
    * @param {string} password - The string to test
    * @param {function} failureCallback - (optional), the function to call on a failure
    * @return {boolean} Returns true if string passes regex, false if not
    */
Tests the string against the allowed chars regex


Tests the string against the allowed chars regex
function validatePassword(password, failureCallback) {
    if (passwordRegex.test(password) && checkLength(password, 5, 16)) {
      return true;
    } else {
      if (failureCallback && typeof(failureCallback) === "function") {
        failureCallback(this.getPasswordAllowedChars());
      }
      return false;
    }
  }
function validatePassword ( password , failureCallback ) { if ( passwordRegex . test ( password ) && checkLength ( password , 5 , 16 ) ) { return true ; } else { if ( failureCallback && typeof ( failureCallback ) === "function" ) { failureCallback ( this . getPasswordAllowedChars ( ) ) ; } return false ; } }
Tests the string against the allowed chars regex
Tests the string against the allowed chars regex