Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 | 5x | export const validatePassword: (value: string) => boolean = value => { if (/\s/.test(value)) { return false; } const hasLowerCase = /(?=.*[a-z])/.test(value); const hasUpperCase = /(?=.*[A-Z])/.test(value); const hasDigits = /(?=.*\d)/.test(value); const hasSpecialCharacter = /(?=.*[!"#$%&'()*+,-./:;<=>?@\[\\\]^_`{|}~])/.test(value); return [hasLowerCase, hasUpperCase, hasDigits, hasSpecialCharacter].filter(el => el).length > 2; }; |