@Password()
New in 2.0Generate random passwords
UserSince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| min | Integer | — | 6 | Min length, default 6 |
| max | Integer | — | 20 | Max length, default 20 |
| allowUpperCase | Boolean | — | true | Allow uppercase, default true |
| allowLowerCase | Boolean | — | true | Allow lowercase, default true |
| allowDigits | Boolean | — | true | Allow digits, default true |
| allowSpecialChar | Boolean | — | false | Allow special chars, default false |
Usage
@Password()Generate password (6-20 chars, A-Za-z0-9)
Example:
@Passd()
Output:
PKA1BGmNiD5p27p2w@Password(min,max)Generate password (min-max length, A-Za-z0-9)
Example:
@Passd(5,8)
Output:
llbxB6ZqLQlgRz@Password(allowUpperCase,allowLowerCase,allowDigits,allowSpecialChar)Generate password (6-20 chars) with specified character sets
Example:
@Passd(true,true,true,true)
Output:
H/70~{E:nmB%e'KIJbW2DP`\<s3b+ze@Password(min,max,allowUpperCase,allowLowerCase,allowDigits,allowSpecialChar)Generate password (min-max length) with specified character sets
Example:
@Passd(5,8,true,true,true,true)
Output:
H-+:6@7^KQf8