on my php i use preg_match to validate input texts.
preg_match
if(preg_match(\'/^[a-zA-Z0-9]+$/\', $firstname)) { }
But this only allows alp
Use
preg_match('/^[a-z0-9 .\-]+$/i', $firstname)