The court shall accept only evidence that is relevant to the case.

If, in the opinion of the court, the evidence presented does not relate to the case under consideration, they shall not be attached to the case file; their rejection as evidence shall be recorded in the judicial act.