mercredi 13 mai 2015

No symbol and number in form validation

I get the surname.Than I do error checking.

if (preg_match("/[\d]/",$surname)) {
     $surnameErr = true;
     } 

The error shown when number is input. However the symbols would not be validated. I ask how to validate all symbols? Thanks.

Aucun commentaire:

Enregistrer un commentaire