i'm trying to not allow the users to introduce special caracters inside the name input box , but it also doesn't allow the user to leave an empty space between his first and last name.
I'm using a built it php function for the validation.
Does anyone know what should i add to it to allow empty spaces?
Here is the line.
elseif (!preg_match("/^[a-zA-Z0-9]*$/", $name)) {
$errorName = true;
}