For client-side validation, you could take a look at this page. However, remember that not all users will necessarily have JavaScript enabled, so you still need to validate the input on the server side, too.
Personally, I prefer to present 3 separate select elements (month, day, year) rather than requiring the user to type things in the right sequence, with the right delimiters, and with the right number of digits. (You still need to validate that the date is valid, but it's much less prone to user error.)