use-password-policy 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,18 +51,23 @@ function MyComponent() {
|
|
|
51
51
|
|
|
52
52
|
**Props:**
|
|
53
53
|
|
|
54
|
-
| Prop Name
|
|
55
|
-
| ---------------------- | --------------------------- |
|
|
56
|
-
| `password`
|
|
57
|
-
| `config`
|
|
58
|
-
| - `minLength` | number | Minimum password length
|
|
59
|
-
| - `uppercaseCharRegex` | RegExp | Regular expression for uppercase characters
|
|
60
|
-
| - `digitRegex` | RegExp | Regular expression for digits
|
|
61
|
-
| - `specialCharRegex` | RegExp | Regular expression for special characters
|
|
62
|
-
| `
|
|
63
|
-
| - `
|
|
64
|
-
| - `
|
|
65
|
-
| - `
|
|
54
|
+
| Prop Name | Props Values | Type | Description | Default Value |
|
|
55
|
+
| ---------------- | ---------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------- |
|
|
56
|
+
| `password` | | string | The password to be validated. | Required |
|
|
57
|
+
| `config` | | object (optional) | An object overriding default configuration for built-in policies. | |
|
|
58
|
+
| | - `minLength` | number | Minimum password length | 8 |
|
|
59
|
+
| | - `uppercaseCharRegex` | RegExp | Regular expression for uppercase characters | /[A-Z]/ |
|
|
60
|
+
| | - `digitRegex` | RegExp | Regular expression for digits | /\d/ |
|
|
61
|
+
| | - `specialCharRegex` | RegExp | Regular expression for special characters | /[!@#$%^&*()_+-=[]{};':"\| |
|
|
62
|
+
| | - `caseCheck` | boolean | This flag determines the availability of a feature or functionality within your application's state | true |
|
|
63
|
+
| | - `lengthCheck` | boolean | This flag determines the availability of a feature or functionality within your application's state | true |
|
|
64
|
+
| | - `digitCheck` | boolean | This flag determines the availability of a feature or functionality within your application's state | true |
|
|
65
|
+
| | - `specialCharCheck` | boolean | This flag determines the availability of a feature or functionality within your application's state | true |
|
|
66
|
+
| `customPolicies` | | array of objects (optional) | An array of custom policies to enforce. | |
|
|
67
|
+
| | - `name` | string | Name of the custom policy for clarity in feedback. | |
|
|
68
|
+
| | - `regex` | RegExp (optional) | Regular expression for custom validation. | |
|
|
69
|
+
| | - `checkFunction` | function (optional) | A function taking the password as an argument and returning true/false for a custom check. | |
|
|
70
|
+
| useDefaultConfig | | boolean | This flag controls whether to use the default configuration for validations or checks in your application. | true |
|
|
66
71
|
|
|
67
72
|
**Return Value:**
|
|
68
73
|
|