Skip to content

Commit b8def07

Browse files
README
Updated the `README` to address the new test result properties (`requiredTestErrors`, `optionalTestErrors`) introduced in PR nowsecure#3.
1 parent cdeecf0 commit b8def07

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ OWASP Password Strength Test
55
lightweight, extensible, has no dependencies, and can be used on the server
66
(nodejs) or in-browser.
77

8-
`owasp-password-strength-test` is not an OWASP project - it is simply based off
8+
`owasp-password-strength-test` is not an OWASP project - it is merely based off
99
of OWASP research.
1010

1111
[![Build Status](https://travis-ci.org/nowsecure/owasp-password-strength-test.svg)](https://travis-ci.org/nowsecure/owasp-password-strength-test)
@@ -80,6 +80,8 @@ The returned value will take this shape when the password is valid:
8080
{
8181
errors : [],
8282
failedTests : [],
83+
requiredTestErrors : [],
84+
optionalTestErrors : [],
8385
passedTests : [ 0, 1, 2, 3, 4, 5, 6 ],
8486
isPassphrase : false,
8587
strong : true,
@@ -100,6 +102,14 @@ The returned value will take this shape when the password is valid:
100102
],
101103
failedTests : [ 0, 4, 5, 6 ],
102104
passedTests : [ 1, 2, 3 ],
105+
requiredTestErrors : [
106+
'The password must be at least 10 characters long.',
107+
],
108+
optionalTestErrors : [
109+
'The password must contain at least one uppercase letter.',
110+
'The password must contain at least one number.',
111+
'The password must contain at least one special character.'
112+
],
103113
isPassphrase : false,
104114
strong : false,
105115
optionalTestsPassed : 1
@@ -117,6 +127,12 @@ Whereby:
117127
- `passedTests` enumerates which tests have succeeded, beginning from 0 with
118128
the first required test
119129

130+
- `requiredTestErrors` is an array containing the error messages of required
131+
tests that have failed.
132+
133+
- `optionalTestErrors` is an array containing the error messages of optional
134+
tests that have failed.
135+
120136
- `isPassphrase` is a `boolean` indicating whether or not the password was
121137
considered to be a passphrase.
122138

0 commit comments

Comments
 (0)