How can I add/improvised my code so Spanish accent will be considered as valid in addition to normal alphabet (a-z)
I have the following in my code
p
You can also use T-Regx:
pattern('[^\p{L}\s-]', 'u')->fails($s);