Re: Modify value of a Django form field during clean()

2009-03-18 Thread Karen Tracey
On Tue, Mar 17, 2009 at 11:16 AM, Ben Gerdemann wrote: > > I am adding custom validation to my forms and custom fields in my > Django app. I would like to be able to modify the value of a field > when triggering an error. For example, if there is an error, the form > should be

Modify value of a Django form field during clean()

2009-03-17 Thread Ben Gerdemann
I am adding custom validation to my forms and custom fields in my Django app. I would like to be able to modify the value of a field when triggering an error. For example, if there is an error, the form should be redisplayed with the field value corrected by clean() and an error message "Data has