CodeIgniter Forums
Allowing custom characters in validation - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Allowing custom characters in validation (/showthread.php?tid=15356)



Allowing custom characters in validation - El Forum - 02-02-2009

[eluser]KeyStroke[/eluser]
Hi,

I'm trying to use the form_validation library to validate some fields in my application. The problem is the fields need to allow a custom set of characters. For example: the username field should only allow alpha characters, numbers, underscores and dots.

How is this done?

Appreciate your help.


Allowing custom characters in validation - El Forum - 02-02-2009

[eluser]GSV Sleeper Service[/eluser]
if none of the preset rules match, you'll have to make a custom callback function.
manual