I have a form as shown below,
class UserForm(forms.ModelForm):
name = forms.CharField(max_length=255)
tagline = forms.CharField(max_length=255)
privacy = forms.CharField(max_length=10)
description = forms.CharField(max_length=2000)
home_id = forms.CharField(max_length=32, required=False)
class Meta:
model = User
fields = ['name', 'tagline', 'privacy', 'description']
and when I pass any field as a boolean or numerical value (say, name=True) , the form validates it form.is_valid returns True while if I skip one field (say name=None), the form says the form is invalid. The form works, but not for a boolean value for any field.
Form also validates correctly for floats, lists and dicts. What am I doing wrong? The same happens for a form.Form without mentioning a model.