Are there any examples in the wild of server side validation implemented by way of validating the data returned from the user using the html of the form itself (ie using xpath queries to retrieve the tags to check their required, pattern, and type attributes)? Particularly, seeing it in either php or python would be helpful. To be clear, I'm interested in situations where the html for the form exists fully complete on the server and then is used as a sort of guide for validating the supplied user data.
The nearest discussions I can find on stackoverflow related to this discussion is one related to asp.net found here, and this one here which is related to php development but response interest.
The closest discussion, otherwise, I found in this article:Your templating engine sucks and everything you have ever written is spaghetti code (yes, you).
I have also discovered an article "Automated server-side form validation" which is paywalled by the IEEE in which the researcher discusses this very concept of traversing the form's dom to build the validation rules server side. In the article, the author notes that "[t]here is no research who has worked on automated server-side form validation in PHP language," using this approach and as of 2012. Is that also true in the wider world?