jQuery-Form-Validator icon indicating copy to clipboard operation
jQuery-Form-Validator copied to clipboard

Removing inline CSS from the strength-meter and adding support to configurable CSS classes

Open rodrigovallades opened this issue 7 years ago • 1 comments

As requested in #434 , this removes the inline css from the 'strength-meter' element and places the styling into the CSS file.

The class names can also be configured via displayPasswordStrength(optionalConfig).

Example:

onModulesLoaded : function() {
  var optionalConfig = {
    text_strength0: 'Wow... weak password',
    text_strength1: 'Hmmm... still weak password',
    text_strength2: 'Getting better',
    text_strength3: 'Perfect!',
    cssClass_strength0: 'strength-weak',
    cssClass_strength1: 'strength-poor',
    cssClass_strength2: 'strength-ok',
    cssClass_strength3: 'strength-awesome'
  };
  $('input[type="password"]').displayPasswordStrength(optionalConfig);
}

rodrigovallades avatar Feb 05 '18 02:02 rodrigovallades

Feel free to raise your PR here: https://github.com/Amedeo91/jQuery-Form-Validator

Amedeo91 avatar Mar 29 '20 17:03 Amedeo91