📅  最后修改于: 2022-03-11 14:47:01.081000             🧑  作者: Mango
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']