title: How do I validate a date string format in python?
body: <p>I have a python method which accepts <strong>a date input as a string</strong>.</p>
  
  <p>How do I add a validation to make sure the date string being passed to the method is in the ffg. format:</p>
  
  <pre><code>'YYYY-MM-DD'
  </code></pre>
  
  <p>if it's not, method should raise some sort of error</p>