Difference between revisions of "Custom Password Policy Examples"
From SmartWiki
(Created page with ' The password must be composed of a combination of at least three of the following character types: uppercase letters, lowercase letters, numbers and special characters: (pars…') |
|||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | The password must be composed of a combination of at least three of the following character types: uppercase letters, lowercase letters, numbers and special characters: | ||
+ | (parseInt('@password@'.match(/[a-z]/g)?1:0) + parseInt('@password@'.match(/[A-Z]/g)?1:0) + | ||
+ | parseInt('@password@'.match(/[0-9]/g)?1:0) + parseInt('@password@'.match(/[^a-zA-Z0-9]/g)?1:0))>=3 | ||
+ | * Note: to require use of only 2 character sets, or all 4 character sets, simply change the integer at the end of the above statement to either 2 or 4 respectively. | ||
+ | First character is not a letter, at least one numeric character and at least one special character: | ||
+ | '@password@'.charAt(0).match(/[a-zA-Z]/g).length>=1&&'@password@'.match(/[0-9]/g).length>=1&&'@password@'.match(/[^a-zA-Z0-9]/g).length>=1 | ||
− | |||
− | |||
− | |||
==See Also== | ==See Also== | ||
* [[Password Policy]] | * [[Password Policy]] | ||
+ | * [[Password Variables to Set or Reset User Passwords]] | ||
[[Category:Global Settings]][[Category:Security]] | [[Category:Global Settings]][[Category:Security]] |
Latest revision as of 11:42, 4 November 2013
The password must be composed of a combination of at least three of the following character types: uppercase letters, lowercase letters, numbers and special characters:
(parseInt('@password@'.match(/[a-z]/g)?1:0) + parseInt('@password@'.match(/[A-Z]/g)?1:0) + parseInt('@password@'.match(/[0-9]/g)?1:0) + parseInt('@password@'.match(/[^a-zA-Z0-9]/g)?1:0))>=3
- Note: to require use of only 2 character sets, or all 4 character sets, simply change the integer at the end of the above statement to either 2 or 4 respectively.
First character is not a letter, at least one numeric character and at least one special character:
'@password@'.charAt(0).match(/[a-zA-Z]/g).length>=1&&'@password@'.match(/[0-9]/g).length>=1&&'@password@'.match(/[^a-zA-Z0-9]/g).length>=1