-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional metadata
type
#82
Comments
We have this use case quite often and so far we have been putting it into another field on the |
|
We would love to have this concept to separate "hacky" fake inputs to a designated location to store data later needed to run validations. One thing to mention here. We would require an API that allows us to update these |
I would love to help make this happen but the PPX stuff is a bit over my head, is there anything we can do to speed this feature up? |
@dan003400 I will look into this in upcoming weeks |
Sometimes, converting
input
tooutput
requires some additional metadata. E.g. there is a select in UI with a list of items, each item is ofFoo.t
type which is a record{id: int, label: string}
. Select's value is stringifiedid
. In the output, there should beFoo.t
. To get the output value in validator,array(Foo.t)
is required.It's achievable in the current state of things by:
input
Foo.t
instead of stringified idfoos: array(Foo.t)
so it's available in validatorBut neither looks nice to me.
Proposal: introduce an optional
metadata
type. If defined, it would be passed as a second argument to validators.The text was updated successfully, but these errors were encountered: