Opened 7 years ago

Closed 7 years ago

#6193 closed (invalid)

clean_* not working with modelform

Reported by: italomaia Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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!")

Change History (1)

comment:1 Changed 7 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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.

Note: See TracTickets for help on using tickets.
Back to Top