passwordPolicy

New in version 12.3

passwordPolicy
Type
string
Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldControl']['passwordPolicy']
Scope
Display, Proc.

This option assigns a password policy to fields of the type password. For configured fields, the password policy validator will be used in DataHandler to ensure, that the new password complies with the configured password policy.

Password policy requirements are shown below the password field, when the focus is changed to the password field.

Examples

Use the default policy

'password_field' => [
    'label' => 'Password',
    'config' => [
        'type' => 'password',
        'passwordPolicy' => 'default',
    ],
],
Copied!

Use the globally defined policy for frontend

'password_field' => [
    'label' => 'Password',
    'config' => [
        'type' => 'password',
        'passwordPolicy' => $GLOBALS['TYPO3_CONF_VARS']['FE']['passwordPolicy'] ?? '',
    ],
],
Copied!

Use the globally defined policy for backend

'password_field' => [
    'label' => 'Password',
    'config' => [
        'type' => 'password',
        'passwordPolicy' => $GLOBALS['TYPO3_CONF_VARS']['BE']['passwordPolicy'] ?? '',
    ],
],
Copied!