File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed
packages/template-retail-react-app/app/utils Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change 55 * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66 */
77
8- import { nanoid , customAlphabet } from 'nanoid'
9-
108/**
119 * Provides mapping of password requirements that have/haven't been met
1210 * @param {string } value - The password to validate
@@ -21,16 +19,3 @@ export const validatePassword = (value) => {
2119 hasSpecialChar : value && / [ ! @ # $ % ^ & * ( ) , . ? " : { } | < > ] / . test ( value ) ? true : false
2220 }
2321}
24-
25- /**
26- * Generates a random password that meets the password requirements
27- * @returns {string } - The generated password
28- */
29- export const generatePassword = ( ) => {
30- return (
31- nanoid ( 8 ) +
32- customAlphabet ( '1234567890' ) ( ) +
33- customAlphabet ( '!@#$%^&*(),.?":{}|<>' ) ( ) +
34- nanoid ( )
35- )
36- }
You can’t perform that action at this time.
0 commit comments