Hi guys,
I would like to validate a name field on a submitted form to allow:
letters, spaces, apostrophes and hyphens
this is causing my script to halt:
// Validate the name - abc's, spaces, periods and apostrophes only
if(empty($authors_name)){
$error .= "Please enter your name.";
}
(!preg_match('/^[a-zA-Z/\\'/\\.-]{2,30}$/',$authors_name)){
$error .= "Your name contains invalid characters.";
}