title: CheckBox Input Validation in Django
body: <p>I want to add a checkbox to my registration field for terms&amp;use. How can I write a clean method to validate this.</p>
  
  <p>I have written a clean method where I want to be sure that I'm catching checkbox value correctly:</p>
  
  <pre><code> def clean_terms(self):
           if self.cleaned_data["terms"] == u'on':
               raise forms.ValidationError(
                   "You have to accept terms&amp;conditions to complete registration"
               )
  </code></pre>
  
  <p>As a result when I fill my registration form and post it, it gives me this validation error :</p>
  
  <p><strong>Terms &amp; Conditions: Select a valid choice. on is not one of the available choices.</strong></p>
  
  <p>So how can I understand that a checkbox is checked and how to correctly implement a term&amp;use checkbox ?</p>
  
  <p>My checkbox field :</p>
  
  <pre><code> terms = forms.ChoiceField(
       label="Terms&amp;Conditions",
       widget=forms.CheckboxInput()
   )
  </code></pre>