Hello everyone,
I have this problem regarding a form validation on my address field. I want my address to contain no special characters, except comma(,) and period(.).
I did the two, but on the script the problem is even the spaces is considered illegal. How can I make the space valid?
Here is the preg code:
if(preg_match_all('/[^a-z0-9_~\.,$]/i', $city_add, $invalid))
{
$errors2[] = "Your address contains invalid character: " . join('',array_unique($invalid[0]));
}
Thanks.