using PERFORM to insert a string of SELECT statement into a temp table
The issue with your SQL is with the type (or return type).

In 

SELECT * FROM validation();


You are using validation() as if the returned value from the function were a table. But you defined the function to return a single value 

CREATE OR REPLACE FUNCTION validation()
  RETURNS text AS $$


So, the said function can't be used in the FROM clause. 

If you are trying to use the side-effects of the function (PERFORM 'INSERT INTO ...), then you can use it in the SELECT list directly, e.g.

SELECT validation();


If you really intend to use the returned relation, then you need to make validation a Set Returning Function (SRF).

--EDIT--

In addition to the return type issue, another error in the IF statement is causing the actual error message (rather than the error in return type, which needs to be fixed as well). 

If I understand what you are looking for (e.g. to test whether col3 = false for some rows in temp_table), one way that I think can achieve it, is to use a query, e.g.: 

IF (SELECT 1 FROM temp_table WHERE  col3 = false) = 1 THEN
  RAISE NOTICE 'there is a false value';
END IF;


The subquery (SELECT 1 FROM temp_table WHERE  col3 = false) returns 1 if FALSE exists, and NULL otherwise.

I don't think it's valid to use temp_table.col3 directly.