Modify value of a Django form field during clean()

前端 未结 7 1471
陌清茗
陌清茗 2020-12-29 04:42

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

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-29 05:22

    change self data in the clean method to change the value which gets displayed

提交回复
热议问题