Addind date validation

// --------------------------------------------------------------------

    /**
     * Is a valid date (dd-mm-YYYY)  (0,1,2,3, etc.)
     *
     * @access	public
     * @param	string
     * @return	bool
     */
    public function valid_date($str) {

        if (preg_match("/^([0-9]{2})-([0-9]{2})-([0-9]{4})$/", $str)) {
            $arDates = explode('-', $str);
            return checkdate($arDates[1], $arDates[0], $arDates[2]);
        } else {
            return FALSE;
        }
    }