Add ability to define field level configurations outside of JSX? #1202
-
Hello guys, I've drafted PR #1201 introducing a new buildFieldConfigurations function to createFormHook (React) that enables developers to define field logic outside of JSX while maintaining full type safety. This feature offers significant benefits for complex form implementations:
I believe this addition would be particularly valuable for applications with complex validation requirements or large-scale forms. I'd appreciate your feedback on this approach and any suggestions for refinement before proceeding further. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
After talking with @juanvilladev on Discord, we decided on an API to do this: const firstNameOpts = fieldOptions({
// Infer the types from `formOptions`
...formOpts,
// Add field-specific APIs
validator: {/* ... */}
}); We'll track more progress in #1201 with the API updates. Thanks for this idea! |
Beta Was this translation helpful? Give feedback.
After talking with @juanvilladev on Discord, we decided on an API to do this:
We'll track more progress in #1201 with the API updates. Thanks for this idea!