Skip to content

Commit 34f4c14

Browse files
committed
Release v3.1.1
- Fix wordTwoCharacterClasses rule error message not showing up.
1 parent a456da8 commit 34f4c14

File tree

10 files changed

+107
-10
lines changed

10 files changed

+107
-10
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 3.1.1
4+
5+
- Fix wordTwoCharacterClasses rule error message not showing up.
6+
37
## 3.1.0
48

59
- Allow chaining after setter methods.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pwstrength-bootstrap",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"homepage": "https://github.com/ablanco/jquery.pwstrength.bootstrap",
55
"authors": [
66
"Alejandro Blanco <[email protected]>"

dist/pwstrength-bootstrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Password Strength plugin for Twitter Bootstrap
3-
* Version: 3.1.0
3+
* Version: 3.1.1
44
*
55
* Copyright (c) 2008-2013 Tane Piper
66
* Copyright (c) 2013 Alejandro Blanco
@@ -154,7 +154,7 @@ try {
154154
) {
155155
return score;
156156
}
157-
return 0;
157+
return;
158158
};
159159

160160
validation.wordRepetitions = function(options, word, score) {

dist/pwstrength-bootstrap.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pwstrength-bootstrap.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<title>Bootstrap 5 Password Strength Meter Example - Rule Options</title>
9+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
10+
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
11+
</head>
12+
13+
<body>
14+
<div class="container mt-2">
15+
<h1>Bootstrap 5 Password Strength Meter Example - Rule Options</h1>
16+
<form role="form" class="my-5">
17+
<div class="row" id="pwd-container">
18+
<div class="col-sm">
19+
<label for="password" class="form-label">Password</label>
20+
<input type="password" class="form-control" id="password" placeholder="Password">
21+
</div>
22+
<div class="col-sm pt-5">
23+
<div class="pwstrength_viewport_progress"></div>
24+
</div>
25+
</div>
26+
<div class="row">
27+
<div id="messages" class="col small text-muted"></div>
28+
</div>
29+
</form>
30+
<pre>jQuery(document).ready(function () {
31+
"use strict";
32+
var options = {};
33+
options.rules = {
34+
activated: {
35+
wordTwoCharacterClasses: true
36+
},
37+
specialCharClass: "[!,@,#,$,%,^,&,*,?,_,~,+]"
38+
};
39+
options.ui = {
40+
container: "#pwd-container",
41+
viewports: {
42+
progress: ".pwstrength_viewport_progress"
43+
},
44+
showVerdictsInsideProgressBar: true
45+
};
46+
options.common = {
47+
debug: true,
48+
onLoad: function () {
49+
$('#messages').text('Start typing password');
50+
}
51+
};
52+
$(':password').pwstrength(options);
53+
});</pre>
54+
<p><a href="..">Go back</a></p>
55+
</div>
56+
57+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
58+
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
59+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
60+
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
61+
crossorigin="anonymous"></script>
62+
<script type="text/javascript" src="../pwstrength.js"></script>
63+
<script type="text/javascript">
64+
jQuery(document).ready(function () {
65+
"use strict";
66+
var options = {};
67+
options.rules = {
68+
activated: {
69+
wordTwoCharacterClasses: true
70+
},
71+
specialCharClass: "[!,@,#,$,%,^,&,*,?,_,~,+]"
72+
};
73+
options.ui = {
74+
container: "#pwd-container",
75+
viewports: {
76+
progress: ".pwstrength_viewport_progress"
77+
},
78+
showVerdictsInsideProgressBar: true,
79+
showErrors: true
80+
};
81+
options.common = {
82+
debug: true,
83+
onLoad: function () {
84+
$('#messages').text('Start typing password');
85+
}
86+
};
87+
$(':password').pwstrength(options);
88+
});
89+
</script>
90+
</body>
91+
92+
</html>

examples/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ <h3>Bootstrap 5</h3>
1717
<ol>
1818
<li><a href="bootstrap5/index.html">Basic usage</a></li>
1919
<li><a href="bootstrap5/popover.html">Show verdict and errors in a popover</a></li>
20+
<li><a href="bootstrap5/rule_options.html">Personalize special chars rule options</a></li>
2021
</ol>
2122

2223
<h3>Bootstrap 4</h3>

examples/pwstrength.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Password Strength plugin for Twitter Bootstrap
3-
* Version: 3.1.0
3+
* Version: 3.1.1
44
*
55
* Copyright (c) 2008-2013 Tane Piper
66
* Copyright (c) 2013 Alejandro Blanco
@@ -154,7 +154,7 @@ try {
154154
) {
155155
return score;
156156
}
157-
return 0;
157+
return;
158158
};
159159

160160
validation.wordRepetitions = function(options, word, score) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pwstrength-bootstrap",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"description": "jQuery plugin for Twitter Bootstrap that provides rulesets for visualy displaying the quality of a users typed in password.",
55
"author": "Alejandro Blanco <[email protected]>",
66
"homepage": "https://github.com/ablanco/jquery.pwstrength.bootstrap",

src/rules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ try {
109109
) {
110110
return score;
111111
}
112-
return 0;
112+
return;
113113
};
114114

115115
validation.wordRepetitions = function(options, word, score) {

0 commit comments

Comments
 (0)