validate datetime fields |
5/13/2011 5:33:58 PM |
PHPRunner Tips and Tricks | |
G
globiws author
Often we have MySQL datetime fields (YYYY-mm-dd HH:mm:ss) in our forms. ^([1-3][0-9]{3,3})-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2][1-9]|3[0-1])\s([0-1][0-9]|2[0-4])<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=17026&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />[0-5][0-9])<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=17026&image=2&table=forumtopics' class='bbc_emoticon' alt=':(' />[0-5][0-9])$ |
|