You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'function evaluates the strength of a given password and returns the type of password strength as a string. The possible strength types are: "veryWeak", "weak", "regular", "strong", or "veryStrong", based on specific criteria.',
30
-
)}
31
-
</p>
32
26
33
27
<h2className="subtitle">Import</h2>
34
28
<p>
@@ -53,88 +47,59 @@ export default async function PasswordStrengthTester({
53
47
</SyntaxHighlighter>
54
48
55
49
<h2className="subtitle">{t("Parameters")}</h2>
56
-
<p>
57
-
{t(
58
-
"The function takes one parameter, which must be a string representing the password to be evaluated.",
59
-
)}
60
-
</p>
61
50
<ul>
62
51
<li>
63
52
<code>password</code> (string) -{" "}
64
53
{t("The password to be evaluated for strength.")}
65
54
</li>
55
+
<li>
56
+
<code>options</code> (object) - An optional object that can be
57
+
passed to the function to customize the strength criteria.
"The function checks the length of the password and applies certain criteria to classify the password strength. The returned strength type is based on the following criteria:",
91
-
)}
92
-
</p>
93
-
<ul>
94
-
<li>
95
-
{t(
96
-
"'veryWeak' - Password with less than 6 characters, consisting only of numbers",
97
-
)}
98
-
</li>
99
-
<li>
100
-
{t(
101
-
"'weak' - Password with less than 6 characters, consisting of numbers and letters",
102
-
)}
103
-
</li>
104
-
<li>
105
-
{t(
106
-
"'weak' - Password that repeats the same character more than 3 times in a row and is less than 10 characters long",
107
-
)}
108
-
</li>
109
-
<li>
110
-
{t(
111
-
"'weak' - Password between 5 and 8 characters, consisting only of numbers",
112
-
)}
113
-
</li>
114
-
<li>{t("'regular' - Password between 9 and 12 characters")}</li>
115
-
<li>
116
-
{t(
117
-
"'regular' - Password greater than or equal to 6 and less than 8 characters, containing at least one number and one letter",
118
-
)}
119
-
</li>
120
-
<li>
121
-
{t(
122
-
"'regular' - Password greater than 10 and has characters that are repeated more than 5 times in sequence",
123
-
)}
124
-
</li>
125
-
<li>{t("'strong' - Password between 13 and 16 characters")}</li>
126
-
<li>
127
-
{t(
128
-
"'strong' - Password with 8 or more characters, containing at least one uppercase letter, one number and one lowercase letter",
129
-
)}
130
-
</li>
131
-
<li>{t("'veryStrong' - Password longer than 16 characters")}</li>
132
-
<li>
133
-
{t(
134
-
"'veryStrong' - Password with 8 or more characters, containing at least one uppercase letter, one number, one special character and one lowercase letter",
0 commit comments