Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django forms error customize

class AccountForm(forms.Form):
    ....your stuff

    def clean_password(self):
        if self.data['password'] != self.data['password_confirm']:
            raise forms.ValidationError('Passwords are not the same')
        return self.data['password']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #forms #error #customize
ADD COMMENT
Topic
Name
5+2 =