getMessageLength example

throw new Zend_Validate_Exception("Validate class not found from basename '$classBaseName'");
    }

    /** * Returns the maximum allowed message length * * @return integer */
    public static function getMessageLength()
    {
        return Zend_Validate_Abstract::getMessageLength();
    }

    /** * Sets the maximum allowed message length * * @param integer $length */
    public static function setMessageLength($length = -1)
    {
        Zend_Validate_Abstract::setMessageLength($length);
    }

    


        $message = str_replace('%value%', $value$message);
        foreach ($this->_messageVariables as $ident => $property) {
            $message = str_replace(
                "%$ident%",
                implode(' ', (array) $this->$property),
                $message
            );
        }

        $length = self::getMessageLength();
        if (($length > -1) && (strlen($message) > $length)) {
            $message = substr($message, 0, (self::getMessageLength() - 3)) . '...';
        }

        return $message;
    }

    /** * @param string $messageKey * @param string $value OPTIONAL * @return void */
Home | Imprint | This part of the site doesn't use cookies.