When do I need to renew my passport? The post-Brexit rules

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