What prerequisite requirements must be fulfilled for a patent?

At the time of the application the invention cannot have been published (novelty) and must be based on an inventive step. Consequently, it cannot have been derived from the prior art in an obvious manner. This state of the art encompasses everything in the public domain prior to the application date, irrespective of where in the world and in what form.

In order not to compromise the novelty of the invention oneself, it needs to be filed before it is published.