php validate name
snippet in php

php validate name

user508

 if(preg_match("/^([a-zA-Z' ]+)$/",$name)){
   retun true; // is validate name
  }