The rule is that your passport must be valid for three months beyond your intended date of departure. The reason for the advice about six months from the date of entry is that you have three months' maximum stay in the Schengen area (90 days, actually), so if your passport expires less than six months after your date of entry, you're going to have to convince the officer that your intended date of departure is really more than three months before the expiration date.
The three-month rule is specified in the Schengen Borders Code, Article 6:
Entry conditions for third-country nationals
- For intended stays on the territory of the Member States of a duration of no more than 90 days in any 180-day period, which entails considering the 180-day period preceding each day of stay, the entry conditions for third-country nationals shall be the following:
(a) they are in possession of a valid travel document entitling the holder to cross the border satisfying the following criteria:
(i) its validity shall extend at least three months after the intended date of departure from the territory of the Member States. In a justified case of emergency, this obligation may be waived;