[Answer]-Type Error when using custom clean_<fieldname> method in django

1👍

Firstly, the error isn’t anything to do with your custom clean method, it is happening in the view.

It is simply that you should use square brackets to access dict items, not parentheses:

unm=form.cleaned_data['username']

Leave a comment