title: form validation fails some times and shows value erorr
body: <p>Sometimes form is validating but sometimes form is not validating and shows value error</p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def hai(request):
      if request.method == 'POST':
          obj1 = hello(request.FILES, request.POST)
          if obj1.is_valid():
              return HttpResponse("success")
  </code></pre>
  
  <p>does form need to be cleaned every time submiting?</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class hello(forms.Form):
      uname = forms.CharField(max_length=100)
      img = forms.FileField()
  </code></pre>
  
  <p><strong>template</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
  &lt;form action= {% url 'hai' %} method="POST" enctype="multipart/form-data "&gt;
    {% csrf_token %}
    &lt;div class="d-flex"&gt;
      &lt;div class="form-group mr-2"&gt;
        &lt;label for="" class="label"&gt;Pick-up date&lt;/label&gt;
        &lt;input type="text" name="uname" class="form-control"
               placeholder="Date"&gt;
      &lt;/div&gt;&lt;br&gt;
      &lt;div class="form-group ml-2"&gt;
        &lt;label for="" class="label"&gt;Drop-off date&lt;/label&gt;
        &lt;input type="file" name="img" class="form-control"
               placeholder="Date"&gt;
      &lt;/div&gt;&lt;br&gt;
      &lt;input type="submit" value="Book Now" class="btn btn-primary py-3 px4"&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is the error:</p>
  
  <p><img src="https://i.stack.imgur.com/ckPr5.png" alt="enter image description here"></p>