CodeIgniter Forums
adding character in the reg expression validation library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: adding character in the reg expression validation library (/showthread.php?tid=6025)



adding character in the reg expression validation library - El Forum - 02-12-2008

[eluser]alebenson[/eluser]
hi there..
i found that to validate some character i need to edit the main library file wich i dont like, do you have any suggestion?

i want to add this 'çÇ' letters to pass the validation, how can i do that?
this is how the code look like

Code:
function alpha($str)
{
    return ( ! preg_match("/^([a-z])+$/i", $str)) ? FALSE : TRUE;
}

for the letters with accent i just converting them to plain letters, its fuck.. its not right i now