I had previously released this for Svelte, but I decided to update it to work as a web component.
Out the box it takes any form and creates a set of stores around values and validity that can be used to drive UI, it can also capture a form submit, allowing for migration from old static form to dynamic one, or creating a dynamic one on any static page you include the module on.
It works with HTML5 validation, so you don't need to do any more than add attributes to your inputs in most cases.