Good day/evening,
I have this problem in my form validation regarding the address input. I want my address to validate the input against special characters except the comma (,) and period (.) . I found a thread here that almost meet my validation but it consider the comma and period to be invalid also, how can I make the comma and period to be valid using this script I found here. Thanks mate for the help.
Here is the script.
if(preg_match_all('/[^a-z0-9_~]/i', $city_add, $invalid))
{
$errors2[] = "Your address contains invalid character: " . join('',array_unique($invalid[0]));
}