Skip to content

SiChangePasswordComponent documentation

selector
si-change-password

A component for changing user passwords with strength validation and policy enforcement.

This component provides a form for users to change their password, including password strength indicators, policy validation, and confirmation fields. It supports custom password policies and displays inline notifications for alerts.

Example:

<si-change-password
  [passwordStrength]="passwordPolicy"
  [passwordPolicyContent]="policyTemplate"
  [changePasswordAlert]="alertConfig"
  (changePasswordRequested)="handlePasswordChange($event)"
  (back)="handleBack()">
</si-change-password>

Input Properties

NameTypeDefaultDescription
backButtonLabel
TranslatableString$localize`:@@SI_CHANGE_PASSWORD.BACK:Back`Description of back button.
changeButtonLabel
TranslatableString$localize`:@@SI_CHANGE_PASSWORD.CHANGE:Change`Label for change password button.
changePasswordAlert
AlertConfigConfig to enable/disable password related error/alerts.
confirmPasswordLabel
TranslatableString$localize`:@@SI_CHANGE_PASSWORD.CONFIRM_PASSWORD:Confirm password`Label for confirm password input field.
disableChange
booleanfalseDisables the change password button.
heading
TranslatableString$localize`:@@SI_CHANGE_PASSWORD.CHANGE_PASSWORD:Change password`Change password heading.
newPasswordLabel
TranslatableString$localize`:@@SI_CHANGE_PASSWORD.NEW_PASSWORD:New password`Label for new password input field.
passwordPolicyContent
Required
(string | TemplateRef<unknown>)Description of the password policy requirements.
passwordPolicyTitle
TranslatableString$localize`:@@SI_CHANGE_PASSWORD.PASSWORD_POLICY:Password policy`Title of the password policy.
passwordStrength
Required
PasswordPolicyDescription of the password policy requirements.
subheading
TranslatableString$localize`:@@SI_CHANGE_PASSWORD.CHANGE_FACTORY_PASSWORD:Factory set password must be changed`Short description of the action to perform.

Output Properties

NameTypeDescription
back
voidEmits on back click.
changePasswordRequested
ChangePasswordEmits password on change event.
passwordStrengthChanged
(number | void)The number indicating the number of rules which still can be met. ( -2 --\​> 2 rules are still unmet, 0 --\​> all met)
valueChanged
ChangePasswordEmits password on value change.

Types Documentation

Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit . Equivalent to a normal string in usage and functionality.
Properties
action?: Link
heading?: string
message: string
severity: StatusType
translationParams?: { [ key: string ]: any } }
Properties
Whether to allow whitespaces. By default whitespaces are not allowed.
allowWhitespace?: boolean
Define if digits are required in password.
digits: boolean
Define if lowercase characters are required in password.
lowercase: boolean
Define minimal number of characters.
minLength: number
Minimum required policies for valid password. When set to a number greater than 0, defines the number of policies that must be met for the password to be valid. E.g. when set to 3 and the policies uppercase/lowercase/digits/special are all set and the password contains 3 out of these four, the password will be valid.
minRequiredPolicies?: number
Define if special characters are required in password.
special: boolean
Define if uppercase characters are required in password.
uppercase: boolean
Properties
confirmPassword: (undefined | null | string)
newPassword: (undefined | null | string)
Translatable
import
("success" | "info" | "warning" | "danger" | "caution" | "critical")

Except where otherwise noted, content on this site is licensed under MIT License.