Good question. I haven’t done this myself, so hopefully there will be some better answers, but you might want to look into HTML validation middleware:
“in all possible scenarios” might be too much to ask for, depending on your app. For example if you make the next Facebook, and are thus accepting huge amounts of user data every day, something will come in at some point that breaks the validity of a page on your site.
As validation errors don’t tend to destroy functionality, it might be an acceptable approach to check with some limited test data, then react to errors as they come up. I believe this is known as stupidity-driven testing.