When do I need to renew my passport for travel to Europe?

Seeing headlines about passports expiring after Brexit? Here are the rules as stated by the European Union, not the UK government nor the airlines