rollthecloudinc / quell

Climate aware CMS breaking web apps free from carbon emissions.
https://demo.carbonfreed.app/pages/create-panel-page
GNU General Public License v3.0
14 stars 1 forks source link

JSON Schema Validation #313

Open ng-druid opened 2 years ago

ng-druid commented 2 years ago

Low priority but worth thinking about.

My initial thoughts on this is that instead of specifying validation on a per form element basis builders could use a schema that covers the entire form. The tricky part of this would be that the schema would probably need to be converted to validator plugins at runtime. We would effectively we adding validator plugins dynamically building them from the json schema. That is the only way I see this working well without major overhaul of the existing validation architecture.

The secondary option would be have a json schema validator on a per form element basis. This would be an additional validation plugin that converts to interface of a validationfn in angular.

Potential Library Candidates: