php validate name preg_match code example Example: validate names regex php preg_match("/^([a-zA-Z' ]+)$/","Given_Name");