The following inference is invalid:
If it rains, the ground gets wet.
The ground is wet.
Therefore it rained.
Washing can also make the ground wet. Thus affirming the consequent does not necessarily affirm the antecedent.
Likewise, “If it does not rain, the ground is dry” need not hold in every circumstance. In an exceptional syllogism, check both the conditional itself and the form of the exception.