title: How can i validate DateTimeField using custom validators in models.py in django?
body: <p><em>models.py</em></p>
  <pre class="lang-py prettyprint-override"><code>def validate_date_time(value):
      if value &gt; timezone.now().date():
          raise validationError(&quot; date/time cannot be in past&quot;)
  
  Scheduled_date_time=models.DateTimeField(validators=[validate_date_time])
  </code></pre>
  <p>I am getting error message:</p>
  <blockquote>
  <p>Enter a Valid date/time.</p>
  </blockquote>
  <p>But, I am expecting:</p>
  <blockquote>
  <p>date/time cannot be in past.</p>
  </blockquote>
  <p>Please help...</p>