title: Django how to validate POST Parameters
body: <p>I pass some parameters to django by a POST request. How can I validate if a parameter is an integer, a String and also that there is no unsecure stuff like code injection inside?
  Is there a django function I can use?</p>
  
  <p>For example:</p>
  
  <pre><code>if request.method == 'POST':
      print request.POST.get('user_comment')
  </code></pre>
  
  <p>How can I check if the POST parameter contains a non dangerous String for my system? Something like </p>
  
  <pre><code>request.POST.get('user_comment').is_valid()
  </code></pre>
  
  <p>Thanks.</p>