kombustor / antd-password-input-strength Goto Github PK
View Code? Open in Web Editor NEWAntD Input component with password-strength indicator.
License: MIT License
AntD Input component with password-strength indicator.
License: MIT License
Hey man, this is wonderful, thank you! But how do you pass a placeholder? I tried and it doesn't show up
Describe the bug
The demo page calculates a different strength from the one the input displays.
To Reproduce
Steps to reproduce the behavior:
{ charsetSize: 94, commonPassword: false, passwordLength: 9, shannonEntropyBits: 28.52932501298081, strengthCode: 'REASONABLE', trigraphEntropyBits: 58.237911691530336, number: true, lower: true, upper: true, punctuation: true, symbol: true }
Which is a reasonably strong password, but the Password input component considers it VERY_WEAK.
Expected behavior
The statuses should match
Desktop (please complete the following information):
Describe the bug
Throws an error when the password is pasted instead of typed.
To Reproduce
Expected behavior
Desktop (please complete the following information):
level
changes only after the validator
function has startedimport { useEffect, useState } from "react";
import "./styles.css";
import { Form } from "antd";
import { PasswordInput } from "antd-password-input-strength";
export default function App() {
const [level, setLevel] = useState(0);
const [form] = Form.useForm();
const minLevel = 1;
const errorMessage = "Password is too weak";
useEffect(() => {
form.validateFields();
}, [level, form]);
return (
<Form form={form}>
<Form.Item
name="test"
rules={[
{
validator: async () => {
return level >= minLevel
? Promise.resolve()
: Promise.reject(errorMessage);
},
message: errorMessage
}
]}
>
<PasswordInput onLevelChange={setLevel} />
</Form.Item>
</Form>
);
}
3.14.1
to 3.15.0
.This version is covered by your current version range and after updating it in your project the build failed.
antd is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
blockNode
. #14858 @kimochgcolon
prop in Form. #15276 @DiamondYuanlabelAlign
. #15252 @yoyo837blockNode
属性。#14858 @kimochgcolon
属性。#15276 @DiamondYuanlabelAlign
属性。#15252 @yoyo837The new version differs by 99 commits.
f2b95d0
chore: add changelog for 3.15.0 (#15281)
a79c788
Merge pull request #15282 from ant-design/feature
b807859
Merge branch 'master' into feature
8f8471f
:lipstick: fix missing semicolon
4cb2850
Merge pull request #15283 from ant-design/chore/mergem
e3a2c38
Merge branch 'master' into chore/mergem
194dedd
Merge pull request #15286 from ant-design/improve-code
884e135
Merge pull request #15285 from jinxin0112/patch-1
bd0eb34
make sure count compare as number
71440a2
Update components/form/style/index.less
da66625
:zap: refactor some code after #15254
7ccf685
fix: appear two colons
a4f73ff
chore: sync master to feature
d02ec78
Merge pull request #15276 from DiamondYuan/form-prop
120ea3a
Merge pull request #15252 from yoyo837/add-label-align
There are 99 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Hey,
If possible, can you add support for the Input.Password component (lets you show the password)
Example:
https://codepen.io/anon/pen/ErvaJE
Thanks.
3.20.4
to 3.20.5
.This version is covered by your current version range and after updating it in your project the build failed.
antd is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
<Button type="danger" ghost />
broken style. #17743<Button type="danger" ghost />
样式问题。#17743The new version differs by 5 commits.
bf2abd1
:sparkles: 3.20.5
896e4e8
Merge pull request #17743 from ant-design/fix-danger-ghost-button
3f2e1b1
Merge pull request #17708 from cottom/chore/remove-extra-disabled
3c771b3
:bug: Fix Button danger style when type is ghost
77d8c92
chore: remove unnecessary disable default props
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Problem
There is no option to validate the form with the password strength at the moment. So for displaying how strong the password is it seems great. But there seems no way to prevent the user from sending insecure passwords. Or am I missing something?
Solution
A property for props like validation=true || false
which toggles the validation of the password and prevents it from sending if unsecure.
index.js:2178 Warning: Each child in an array or iterator should have a unique "key" prop.
Check the top-level render call using
. See https://fb.me/react-warning-keys for more information.
in div
in Unknown (created by PasswordInput)
in div (created by PasswordInput)
in PasswordInput (at Password.js:18)
in span (created by Context.Consumer)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.