2👍
✅
No, the form doesn’t even contain the username field if it has been excluded.
If you want to perform validation on the field through the form, you should modify the POST dictionary.
post = request.POST.copy()
post['username'] = 'Foobar'
form = ExampleForm(post)
Source:stackexchange.com