• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
validation: alpha_dash but allow spaces?

#1
[eluser]Boyz26[/eluser]
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!

#2
[eluser]xwero[/eluser]
add a function to application/libraries/MY_Validation.php file with your own regex to allow spaces.

#3
[eluser]mdavis1982[/eluser]
Or just add a callback validation method in your controller with a regex to allow spaces.

#4
[eluser]Boyz26[/eluser]
Alright! Thank you so much!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.