-
rule-based-data-validation
Declarative data validation made with rule-based approach and functional programming.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
I won't show the code for the markup, the styles, and most of the DOM handling because it's not that important for this topic. But you can always see the source code on GitHub or look it up in the running application.
If you really need the library, then the pure functions won't be difficult to pair with it. Especially if the library also supports the declarative approach, like React Hook Form.