The simples PHP function that does the job I can think of is checkdate():
if (checkdate(2, 28, 1999)) { // Feb. 28th, 1999
echo 'valid';
} else {
echo 'invalid';
}
You should also read:
- PHP: Check or Validate URL and Email Addresses – an Easier Way than Regular Expressions, the filter_var() Function
- PHP: Display Files and Sub-directories of A Directory Recursively as A Tree
- Regular Expressions for Natural Numbers or Positive Integers (1, 2, 3, …), Negative Integers and Non-negative Integers
- PHP: True empty() function to check if a string is empty or zero in length
- PHP: Check if A String Contain Only Uppercase / Capital Letters


Facebook
Twitter
Google Plus