Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 8881412

Browse files
committed
Fixing isValid flah
1 parent 3ef2e03 commit 8881412

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/react-nice-input-password.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ var NiceInputPassword = function (_React$Component) {
627627
value: target.value,
628628
isValid: this.state.levels.filter(function (level) {
629629
return level.isValid;
630-
}).length > 0
630+
}).length === this.state.levels.length
631631
});
632632

633633
this.setState({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-nice-input-password",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"description": "React input password component",
55
"main": "dist/react-nice-input-password.js",
66
"style": "dist/react-nice-input-password.css",

src/NiceInputPassword.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class NiceInputPassword extends React.Component {
7878
this.props.onChange({
7979
name: this.props.name,
8080
value: target.value,
81-
isValid: this.state.levels.filter(level => level.isValid).length > 0,
81+
isValid: this.state.levels.filter(level => level.isValid).length === this.state.levels.length,
8282
});
8383

8484
this.setState({

0 commit comments

Comments
 (0)