Opened 17 years ago
Closed 17 years ago
#6193 closed (invalid)
clean_* not working with modelform
Description ¶
Well, i tried to write some custom validation with model form using the pattern clean_fieldname. Well,
with latest django from svn, it didn't work. Example:
class MyModel(models.Model):
title = models.TextField(max_length=20)
class FormForMyModel(newforms.ModelForm):
class Meta:
model = MyModel
def clean_title(self):
print "test"
yield ValidationError("Clean_title is never called!")
Note:
See TracTickets
for help on using tickets.
Please don't post usage questions to Trac. Take this to django-users or #django on freenode. Create a new ticket with specific information on how to reproduce the bug.