Numbers 9:6-14 talks about some israelites that were unclean but still wanted to celebrate the Passover. They asked Moses if they could, and Moses asked God, and God said (verse 10, NIV):
... When any of you or your descendants are unclean because of a dead body or are away on a journey, they are still to celebrate the LORD's Passover.
We see a similar situation in 2 Chronicles 30:17-20, in which some israelites that had not purified themselves ate the Passover, but the author says (verse 18, NIV):
Although most of the many people who came from Ephraim, Manasseh, Issachar and Zebulun had not purified themselves, yet they ate the Passover, contrary to what was written.
Then king Hezekiah prayed for them, etc.
How is that contrary to what was written?