How would you use loader data in validationAttrs in your formDefinition? #38
bitofbreeze
started this conversation in
General
Replies: 1 comment 1 reply
-
If you generate the validations on the loader (because they depend on the type of user, for example), then I assume you need to send them over to the client and submit them back to the action() in a hidden input. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Wanting to define a field like:
The only way I can think of is defining the formDefinition in the component but then you can't use the same formDefinition in validateServerFormData in the action. Maybe making a defineForm function that takes in the data you need to validate against so that you can use it in both. Wondering if anyone else has a good pattern
Beta Was this translation helpful? Give feedback.
All reactions