Welcome Guest, Not a member yet? Register   Sign In
Extend form_validation to add custom error messages
#4

[eluser]InsiteFX[/eluser]
Why don't you just use this method?
Code:
// --------------------------------------------------------------------

    /**
     * Set Error Message
     *
     * Lets users set their own error messages on the fly.  Note:  The key
     * name has to match the  function name that it corresponds to.
     *
     * @access    public
     * @param    string
     * @param    string
     * @return    string
     */
    function set_message($lang, $val = '')
    {
        if ( ! is_array($lang))
        {
            $lang = array($lang => $val);
        }

        $this->_error_messages = array_merge($this->_error_messages, $lang);

        return $this;
    }

InsiteFX


Messages In This Thread
Extend form_validation to add custom error messages - by El Forum - 03-28-2011, 02:34 AM
Extend form_validation to add custom error messages - by El Forum - 03-28-2011, 06:57 AM
Extend form_validation to add custom error messages - by El Forum - 03-28-2011, 06:59 AM
Extend form_validation to add custom error messages - by El Forum - 03-28-2011, 08:56 AM
Extend form_validation to add custom error messages - by El Forum - 03-28-2011, 12:54 PM
Extend form_validation to add custom error messages - by El Forum - 03-28-2011, 08:02 PM
Extend form_validation to add custom error messages - by El Forum - 03-29-2011, 02:01 AM
Extend form_validation to add custom error messages - by El Forum - 04-17-2011, 05:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB