Beispiel #1
0
    def clean(self):
        cleaned_data = super(ApproveForm, self).clean()

        # validate password (requires username to check similarity)
        username = cleaned_data.get("username")
        password = cleaned_data.get("password")

        if username and password:
            wrap_validator(validators.validate_password)(username, password)
Beispiel #2
0
    def clean(self):
        cleaned_data = super(ChpassForm, self).clean()

        # validate password (requires username to check similarity)
        username = cleaned_data.get('ocf_account')
        password = cleaned_data.get('new_password')

        if username and password:
            wrap_validator(validators.validate_password)(username, password)