PasswordChangeForm
A form that lets a user change their password by entering their old password.
Attributes
| Attribute | Type | Description |
|---|---|---|
| error_messages | dict | A dictionary mapping error codes to localized error message strings, including a specific message for incorrect old password entries. |
| old_password | forms.CharField | A form field used to collect and validate the user's current password before allowing a change. |
| field_order | list = ["old_password", "new_password1", "new_password2"] | A list defining the display sequence of form fields, ensuring the old password field appears before the new password fields. |
Constructor
Signature
def PasswordChangeForm()
Methods
clean_old_password()
@classmethod
def clean_old_password() - > string
Validate that the old_password field is correct.
Returns
| Type | Description |
|---|---|
string | The validated old password string if the authentication check succeeds |