Welcome Guest, Not a member yet? Register   Sign In
validation: alpha_dash but allow spaces?

Hi everyone,

I was trying to make a 'Display Name' input form and then validate it to make sure it only can be alpha_dash. But is there any way I can allow spaces in the form? Is there a way to add in exceptions?

Thank you!

add a function to application/libraries/MY_Validation.php file with your own regex to allow spaces.

Or just add a callback validation method in your controller with a regex to allow spaces.

Alright! Thank you so much!

Theme © iAndrew 2016 - Forum software by © MyBB