I want to check and see if a date conforms to a xx-xx-xx pattern. I have
if (!(ereg("([0-9]{2})-([0-9]{2})-([0-9]{2})$",$udate)))
{
$MyErrors="Date was given in a invalid format date must conform to the xx-xx-xx pattern.<BR>";
}
but it allows xx-xx-x and i cant determine why
Thanks in advance for any help you can afford.