Skip to content

Commit 4ab816b

Browse files
authored
Merge pull request #871 from bootboxjs/input-number-min-max-fix
Fixes inputType min and max validation
2 parents 69b32c2 + a80fa84 commit 4ab816b

File tree

14 files changed

+55
-29
lines changed

14 files changed

+55
-29
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 6.0.2 (Latest Release)
1+
## 6.0.3 (Latest Release)
2+
3+
-Updates `min` and `max` validation for the `number` input type to allow min and max to be equal
4+
5+
### 6.0.2
26

37
- Updates `OK` text for Japanese locale
48

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ Bootbox **3.3.0** is the *last* release to support Bootstrap 2.2.x.
4242

4343
Much more dependency information can be found [on the Bootbox website](http://bootboxjs.com/getting-started.html#bootbox-dependencies).
4444

45-
## 6.0.2 (Latest Release)
45+
## 6.0.3 (Latest Release)
4646

47-
- Updates `OK` text for Japanese locale
47+
- Updates `min` and `max` validation for the `number` input type to allow min and max to be equal
4848

4949
For a full list of releases and changes please see [the changelog](https://github.com/bootboxjs/bootbox/blob/master/CHANGELOG.md).
5050

bootbox.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*! @preserve
22
* bootbox.js
3-
* version: 6.0.2
3+
* version: 6.0.3
44
* author: Nick Payne <[email protected]>
55
* license: MIT
66
* http://bootboxjs.com/
@@ -22,7 +22,7 @@
2222

2323
let exports = {};
2424

25-
let VERSION = '6.0.2';
25+
let VERSION = '6.0.3';
2626
exports.VERSION = VERSION;
2727

2828
let locales = {
@@ -1183,8 +1183,8 @@
11831183
}
11841184

11851185
if (minValid && maxValid) {
1186-
if (max <= min) {
1187-
throw new Error('"max" must be greater than "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.');
1186+
if (max < min) {
1187+
throw new Error('"max" must be greater than or equal to "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.');
11881188
}
11891189
else {
11901190
result = true;

dist/bootbox.all.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*! @preserve
22
* bootbox.js
3-
* version: 6.0.2
3+
* version: 6.0.3
44
* author: Nick Payne <[email protected]>
55
* license: MIT
66
* http://bootboxjs.com/
@@ -22,7 +22,7 @@
2222

2323
let exports = {};
2424

25-
let VERSION = '6.0.2';
25+
let VERSION = '6.0.3';
2626
exports.VERSION = VERSION;
2727

2828
let locales = {
@@ -1185,8 +1185,8 @@
11851185
}
11861186

11871187
if (minValid && maxValid) {
1188-
if (max <= min) {
1189-
throw new Error('"max" must be greater than "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.');
1188+
if (max < min) {
1189+
throw new Error('"max" must be greater than or equal to "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.');
11901190
} else {
11911191
result = true;
11921192
}
@@ -1209,7 +1209,7 @@
12091209

12101210
/*! @preserve
12111211
* bootbox.locales.js
1212-
* version: 6.0.2
1212+
* version: 6.0.3
12131213
* author: Nick Payne <[email protected]>
12141214
* license: MIT
12151215
* http://bootboxjs.com/

dist/bootbox.all.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/bootbox.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*! @preserve
22
* bootbox.js
3-
* version: 6.0.2
3+
* version: 6.0.3
44
* author: Nick Payne <[email protected]>
55
* license: MIT
66
* http://bootboxjs.com/
@@ -22,7 +22,7 @@
2222

2323
let exports = {};
2424

25-
let VERSION = '6.0.2';
25+
let VERSION = '6.0.3';
2626
exports.VERSION = VERSION;
2727

2828
let locales = {
@@ -1183,8 +1183,8 @@
11831183
}
11841184

11851185
if (minValid && maxValid) {
1186-
if (max <= min) {
1187-
throw new Error('"max" must be greater than "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.');
1186+
if (max < min) {
1187+
throw new Error('"max" must be greater than or equal to "min". See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.');
11881188
}
11891189
else {
11901190
result = true;

dist/bootbox.locales.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*! @preserve
22
* bootbox.locales.js
3-
* version: 6.0.2
3+
* version: 6.0.3
44
* author: Nick Payne <[email protected]>
55
* license: MIT
66
* http://bootboxjs.com/

dist/bootbox.locales.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bootbox.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.

header.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Bootbox.js — alert, confirm, prompt, and flexible dialogs for the Bootstrap framework
3-
* @version: 6.0.2
3+
* @version: 6.0.3
44
* @project: https://github.com/bootboxjs/bootbox
55
* @license: MIT http://bootboxjs.com/license.txt
66
*/

0 commit comments

Comments
 (0)