PDA

View Full Version : 16 or older


Cologne
06-20-2009, 01:29 AM
Hi,

will this server validation check if the user is older than 16?

$WAFV_Errors .= WAValidateDT(((isset($_POST["Birthday"]))?$_POST["Birthday"]:"") . "",true,"\b([12]\d|3[0-1]|0[1-9])\.(1[0-2]|0[1-9])\.\d{4}\b","mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\")+16);","",false,".*","","",true,5);

Cheers
Denis

Ray Borduin
06-20-2009, 07:14 AM
I think probably more like:


$WAFV_Errors .= WAValidateDT(((isset($_POST["Birthday"]))?$_POST["Birthday"]:"") . "",true,"\b([12]\d|3[0-1]|0[1-9])\.(1[0-2]|0[1-9])\.\d{4}\b","". strtotime("-16 years") ."","",false,".*","","",true,5);