Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, they're not validating JSON. Forms are text value fields that aren't always sent as JSON later, or necessarily sent over the wire at all.

They definitely are using their DSL for things far out of the scope of JSON schema. The builtin debouncing is pretty neat: https://formkit.com/essentials/validation#debounce-milli

Forms in UI code also tend to have a bunch of business-logic type validation (e.g. "there's already a user with that email address") which schemas alone are unsuitable for.



Well, they produce JSON though. I understand that there is much more context related to the user interface but you can extend JSON Schema to be able to tie more information to it. It's an incredibly flexible & collaborative way to define the schemas. The backend people are also familiar with it and can validate the data & collaborate with frontend people over a JSON Schema probably much easier compared to a frontend libraries DSL.

For example; React has a library to generate forms via JSON Schema and you can use uiSchema feature for the use-case that you mentioned: https://react-jsonschema-form.readthedocs.io/en/latest/api-r...


But then I'm running a bespoke DSL for interface display in a validation lib.

It's not obvious that's the better direction eh?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: