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, i
This is the way I've tried and works for me:
inst = my_form.save(commit=False) if not inst.a34_stuff: # or incorrect inst.data["a34_stuff"] = "corrected"