Welcome Guest, Not a member yet? Register   Sign In
Form Validation and Regexp
#1

[eluser]Unknown[/eluser]
Hello I need to set_rules in Form Validation to regexp pattern from database:

I used callback function but it doesn't working.

How can I use it? I found it in form_validation:
Code:
/**
     * Performs a Regular Expression match test.
     *
     * @access    public
     * @param    string
     * @param    regex
     * @return    bool
     */
    function regex_match($str, $regex)
    {
        if ( ! preg_match($regex, $str))
        {
            return FALSE;
        }

        return  TRUE;
    }

But I don't know how to use it.


Messages In This Thread
Form Validation and Regexp - by El Forum - 07-26-2011, 07:48 AM
Form Validation and Regexp - by El Forum - 07-26-2011, 10:01 AM
Form Validation and Regexp - by El Forum - 07-27-2011, 08:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB