Is because of the . in the beginning, which is considered the search for "a character" and more [a-zA-ZÀ-ú\s]+, that would be the second or more characters, see the difference:
also do not forget the ^ to require the string to begin and end (with $) exactly as the regex defines, because if not it will require only that you finish, but the beginning may have any input format
Enjoy and also add the modify i, for case-insensitive, so you won’t need A-Z and a-z, stay like this: /^[a-zà-ú\s]+$/i
Then change to:
filter_input(INPUT_POST, 'nome', FILTER_VALIDATE_REGEXP, array("options" => array("regexp" => "/^[a-zà-ú\s]+$/i"))
Note that for unicode, if you are using UTF-8 for example, you may need to use the modifier u, thus: /^[a-zà-ú\s]+$/iu
I put this one: / [a-zà-ù s]+$/i and this one: / [a-zà-ù s]+$/Iu. It keeps giving the same problem.
– Luizinho
I had testing before without the stitch too, but was giving this problem.
– Luizinho
Oops! Got it here! I forgot to update. rsrs
– Luizinho