• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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