/**
* @param PasswordField $field
*/
protected function getConstraints(Field
$field): array
{ $constraints =
[ new NotBlank(),
new Type('string'
),
];
if ($field->
getFor() === null || !\
array_key_exists($field->
getFor(), self::CONFIG_MIN_LENGTH_FOR
)) { return $constraints;
} $configKey = self::CONFIG_MIN_LENGTH_FOR
[$field->
getFor()];
$minPasswordLength =
$this->configService->
getInt($configKey);
if ($minPasswordLength === 0
) { return $constraints;
}