I have a python method which accepts a date input as a string.

How do I add a validation to make sure the date string being passed to the method is in the ffg. format:

'YYYY-MM-DD'

if it’s not, method should raise some sort of error

5 Answers
5

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *