victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
972 stars 476 forks source link

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

Open rodrigovallades opened 6 years ago

rodrigovallades commented 6 years ago

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);
}
Amedeo91 commented 4 years ago

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