protected function validatePassword($password)
    {
        if (!(new tao_helpers_form_validators_NotEmpty())->evaluate($password)) {
            throw new common_exception_ValidationFailed(GenerisRdf::PROPERTY_USER_PASSWORD, __('Password is empty.'));
        }

        /** @var ValidatorInterface $validator */
        foreach (PasswordConstraintsService::singleton()->getValidators() as $validator) {
            if (!$validator->evaluate($password)) {
                throw new common_exception_ValidationFailed(GenerisRdf::PROPERTY_USER_PASSWORD, $validator->getMessage());
            }
        }
    }