I am working with server side code.
I have a request object that handles request data validation and filtering.
I have a view object that uses template files to generate html for output. the template files are mostly html. you can put one view object inside of another view object in order to assemble a page piece by peice. for instance you might have a page layout view, and you might put a form view inside the page layout view.
One of the features of the request object is that it can automatically build validations using an html5 string containing a form. It parses the html string and grabs input types and other tag attributes that determine HTML5 validation, then matches this validation server side. I get this html string from a view object. This way no matter what the designer puts in the view's template file, it will automatically get validated according to the html5 attributes server side.
i create and use the same view that was originally used to generate the page, to build validations for the request when the page is then submitted back to the server.
I would like to get feedback on this idea. Pros/Cons/Other Concerns.