应用PasswordStrengthBar后,我应该如何检查密码是弱密码还是好密码?
How should I check if the password is weak or good After applying PasswordStrengthBar?
我正在使用 PasswordStrengthBar import PasswordStrengthBar from 'react-password-strength-bar';
https://www.npmjs.com/package/react-password-strength-bar
我想在点击确认按钮并且密码是弱密码时显示一条消息..
我应该如何检查密码是弱密码还是好密码?
<input type="password" className="form-control" value={this.state.newPassword} onChange={this.passwordOnChange} id="pwd" />
<PasswordStrengthBar password={this.state.newPassword} />
根据github这个包的来源
https://github.com/lannex/react-password-strength-bar/blob/master/examples/src/Home.js
只要分数随 onChangeScore
属性
发生变化,您就可以调用一个函数
<PasswordStrengthBar
password={this.state.newPassword}
onChangeScore={score => {
console.log(score);
}}
/>
我正在使用 PasswordStrengthBar import PasswordStrengthBar from 'react-password-strength-bar';
https://www.npmjs.com/package/react-password-strength-bar
我想在点击确认按钮并且密码是弱密码时显示一条消息.. 我应该如何检查密码是弱密码还是好密码?
<input type="password" className="form-control" value={this.state.newPassword} onChange={this.passwordOnChange} id="pwd" />
<PasswordStrengthBar password={this.state.newPassword} />
根据github这个包的来源
https://github.com/lannex/react-password-strength-bar/blob/master/examples/src/Home.js
只要分数随 onChangeScore
属性
<PasswordStrengthBar
password={this.state.newPassword}
onChangeScore={score => {
console.log(score);
}}
/>