Update 31-Jul-2010:Check out the updated version for a slightly more concise function.

This is an updated PHP based date validator, correcting some issues with the original version. An additional parameter has been added specifying the expected format of the date, using PHP date expressions.