elboletaire / password-strength-meter

:key: A password strength meter for jQuery
https://elboletaire.github.io/password-strength-meter/
GNU General Public License v3.0
107 stars 45 forks source link

Custom strength steps (ranges) #6

Closed hmichal-dev closed 4 years ago

hmichal-dev commented 6 years ago

You can define custom steps in options. Steps must be sorted ascending.

var config = {
    customSteps: {
      0: 'Really insecure password. You never should use it.',
      30: 'Insecure password',
      50: 'Hmm....',
      75: 'Strong password',
      95: 'Yeah! Really strong password'
    }
  }
$('#password').password(config);
hmichal-dev commented 6 years ago

Travis test failed due to incorrect configuration

elboletaire commented 6 years ago

Nice, I thought previously in adding a feature like this.

Could you please add a test to check if it works as expected?

hmichal-dev commented 6 years ago

@elboletaire I can't write JavaScript tests. I'm a backend developer.

elboletaire commented 6 years ago

I don't understand that argument. I'm a backend developer and I test both backend and frontend, and they are tested the same way. Actually, the tests run in this project are run exactly like any backend tests, but using libraries to simulate there's a DOM.

Just take a look to the test file, and also to this part of the readme where you can see how tests are executed: https://github.com/elboletaire/password-strength-meter#testing

BTW, if you really think you cannot do it, let me know and I'll do it for you when I can.

hmichal-dev commented 6 years ago

I test backend but I don't know any framework for testing JavaScript. I'm busy in this month so I can't spend time learning it.

elboletaire commented 6 years ago

refs #11

jhoover4 commented 5 years ago

Do we still need a test for this? I'd be happy to help.

elboletaire commented 5 years ago

Thanks @jhoover4, but I'm refactoring entirely. That's why I've tagged it for the version 2.0.0, because it'll bring breaking changes:

Also, for v2 there are other issues on track: https://github.com/elboletaire/password-strength-meter/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.0.0

jhoover4 commented 5 years ago

For sure, makes sense. I guess I was just offering to help with the overall refactoring if you need it! If not, no worries.

elboletaire commented 5 years ago

Ofc you can do it if you take all that in mind. I'm probably not gonna work on it until next weekend or so; you're free to take any of the issues for the V2 (even for V3 if you want) and make a PR.

jhoover4 commented 5 years ago

Sweet, I'll try to push up this and the other issue I commented on.

jhoover4 commented 5 years ago

Okay I added a PR for this #26

elboletaire commented 4 years ago

Superseeded by #26