Code Monkey home page Code Monkey logo

strength-meter's Introduction

strength-meter's People

Contributors

adrian-enspired avatar caiwp avatar euivanw avatar freetuts avatar kartik-v avatar lars-t avatar metola avatar soullivaneuh avatar tibee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

strength-meter's Issues

Invalid feedback not showing

When using the input with Bootstrap 4 the invalid feedback does not show up on error state.

$form = ActiveForm::begin([
    'layout' => ActiveForm::LAYOUT_HORIZONTAL,
    'method' => 'post',
]);

echo $form->field($model, 'password')->widget(PasswordInput::class);

ActiveForm::end();

The selector in Bootstrap 4 to show the invalid feedback is .was-validated :invalid ~ .invalid-feedback, .was-validated :invalid ~ .invalid-tooltip, .is-invalid ~ .invalid-feedback, .is-invalid ~ .invalid-tooltip, which does not match the layout of the Strenth input.

Add option to define a target container for the meter

This plugin works great.

But the strength meter is always placed right next to the input. It would be nice if there was een option to indicate the target container where the meter should be displayed. This way a developer can put the meter indicater where ever he wants.

Regards,

Marc

Turkish translation

Strength Meter Turkish translation.
This file must be saved in UTF-8 encoding.

(function ($) {
"use strict";

$.fn.strengthLocales['tr'] = {
    toggleTitle: 'Parolayı göster/gizle',
    verdictTitles: {
        0: 'Çok kısa',
        1: 'Çok zayıf',
        2: 'Zayıf',
        3: 'İyi',
        4: 'Güçlü',
        5: 'Çok güçlü'
    }
};

})(jQuery);

A fix size is not friendly with a responsive design

By reading the "README.md" we can think that this project want to target the bootstrap framework some how or at less be compatible with it. Unfortunately the plugin works by moving a preset image in the background which forces the kv-score bar to have a fixed size, losing the opportunity to really be responsive.

Fortunately it is very easy to stop using a background image and instead set a background color for the score box avoiding the need to set a width and making the plugin friendly with a responsive design.

Please see some ideas of how to implement the background color of the kv-score box, without the usage of an image here:
https://stackoverflow.com/questions/7128675/from-green-to-red-color-depend-on-percentage

Example:

This is an example of how i fixed this problem from outside the plugin, without to touch the code, but for sure will be preferable if strength-meter is already prepared to work with percentages and not with a fixed box width.

https://jsfiddle.net/lestcape/j0exbomq/

Scoring penalty removed for successive lowercase letters

Thank you for this plugin.

I just updated it from v1.0.0 to last (v1.1.4) on a very old app and noticed a change in the scoring behavior.
Point deduction does not apply anymore for consecutive lowercase letters presence.
It does apply correctly with consecutive uppercase letters though.

If I'm not mistaken, this change appeared in v.1.1.1 (because of the "break;" in the for loop of the getScore function).

To reproduce, compare before and after v1.1.1 :

  • install version before v1.1.1

  • type in "aaaaaa"

  • see calculated score : 1%

  • install latest version

  • type in "aaaaaa"

  • see calculated score : 28%

You can as well see this behaviour on the plugin demo page (http://plugins.krajee.com/strength-meter/demo).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.