Regex overkill and will work worse for such a simple task, consider using your own string functions:
if (ctype_alpha(str_replace(' ', '', $name)) === false) { $errors[] = 'Name must contain letters and spaces only'; }
This will result in a space bar before starting the alpha check. If tabs and newlines are a problem, you might think about this:
str_replace(array("\n", "\t", ' '), '', $name);
source share