I am trying to build site with custom script. I have problem with allowing space in Name input field. If i include space, it will give error but if input slash or underscore, it accepts.
my name – i am getting not allowed error
my_name – i am getting success message.
code
if(!preg_match('/^[0-9a-zA-Z\xe0-\xef\x80-\xbf._-]+$/i',$nickname)) {
You need to add \s for space to your regex.
I have try this :
For debugging regex may be you can use this tools.