Welcome Guest, Not a member yet? Register   Sign In
alpha, xss_clean and i18n in CI
#2

[eluser]Crimp[/eluser]
Anyways:

Code:
function alpha_check($str)
    {    
        setlocale(LC_ALL, 'your locale');
        
        if (!ctype_alpha($str)) {
        
            $this->validation->set_message('alpha_check', 'Your error message.');
            return FALSE;
        
        } else {
        
            return TRUE;
        
        }
        
    }
Code:
function alphanumeric_check($str)
    {
        setlocale(LC_ALL, 'your locale');
        
        if (!ctype_alnum($str)) {
        
            $this->validation->set_message('alphanumeric_check', 'Your error message.');
            return FALSE;
        
        } else {
        
            return TRUE;
        
        }
        
    }


Messages In This Thread
alpha, xss_clean and i18n in CI - by El Forum - 06-23-2007, 04:16 AM
alpha, xss_clean and i18n in CI - by El Forum - 06-24-2007, 04:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB