Regex for people names PHP
<p>I am using this regex to make sure that names can only contain letters, apostrophe or hyphen.</p>

<pre><code>Validator::extend('people_names', function($attribute, $value, $parameters, $validator) {
        return preg_match("^[a-zA-Z-'\s]+$^", $value);
</code></pre>

<p>When I use this <a href="http://www.phpliveregex.com/p/h7p" rel="nofollow">tool</a> to check if the regex is correct, it shows its correct, but in my form when I test an input starting with digits or any other characters like <code>123name</code> or <code>#$#$name</code> it passes while it should not. An input with letters then digits like <code>name123</code> is rejected. </p>