Welcome Guest, Not a member yet? Register   Sign In
Form validation function to allow all alpha-like characters
#1

[eluser]Daniel H[/eluser]
I have a slightly modified alpha_dash function to allow spaces, but I also want to allow alpha-like foreign characters like aàáâãäå, eéèêë, iì etc. Any ideas how I change the regex to allow this

Code:
return ( ! preg_match("/^([-a-z0-9 _-])+$/i", $str)) ? FALSE : TRUE;
#2

[eluser]gullah[/eluser]
I'm pretty sure you just add it inbetween the []
#3

[eluser]Daniel H[/eluser]
But I want to accept any such character - do I have to enter them all individually?!
#4

[eluser]Jamie Rumbelow[/eluser]
You could allow any character by putting (.*)




Theme © iAndrew 2016 - Forum software by © MyBB