Hi guys, I have a form that allows the user to enter a date:

<div id="addmovie_date">
<label for="date"><strong>Release Date (YYYY-MM-DD):</strong</Label><br/>
<input type="text" name="date"/><br/>
I am wondering how to check that the user has input the correct DATE format and (YYYY-MM-DD) and nothing else

closest thing I've used ot this is:

if(strlen($moviename) > 80) {
			header("Location: /movies/addmovie.php?user=' . $username . ");
			include 'error.php';
			$error = 'movie name must not exceed 80 characters.';
my little error include thing there messes my page up, but anyway! hehe

I'm sure there's something similar for me to use for the date?