Helo!
one way to do that is to see if each of the date pieces are correct. ie see if the year's on the limit you want, then see if the month's number is ( of course) between 1 and 12, then ( if you declare and fill a litle array of 12 elements with the max number of each month) with the number of the month you'll have the item number of the array ( in your exemple say 4). That element have 30 ( wich is the max number of day in April). Finally if you have a febuary date you'll need to see if in that year there are another day. you can do this by dividing your year by 4 and obtaning the remaining. it will indicate if the febuary date is correct!
Better than that is to create a little function to handle what i've wrote and that return a 0 ( invalid date) or 1 ( valid date). so later you'll need only something like:
if valid_date("2014-02-29")= 1 then ...