Opened 17 years ago

Closed 17 years ago

#6193 closed (invalid)

clean_* not working with modelform

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

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 by Brian Rosner, 17 years ago

Resolution: invalid
Status: newclosed

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