KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Enforcing Standard Password Compliance
PRODUCT: 4D | VERSION: 11.5 | PLATFORM: Mac & Win
Published On: February 11, 2010

These are common rules for password complexity:

1. At least eight numbers.
2. At least one capital letter.
3. At least one lower case later.

The following regular expression can be used to enforce those rules:

"^.*(?=.{8,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$"

The password string can be verified with the Match regex command.

Here is an example of how to use the expression:

C_BOOLEAN($found)
C_TEXT($password)
C_TEXT(regExpression)

regExpression:="^.*(?=.{8,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$"

$found:=Match regex(regExpression;$password)


$found is True if a match is found in the password string.