Can i reference a components table?
I am using a component plugin and want to use v.id("componentTableName")
but the validator is not passing the value even if the value is valid
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
in the component itself, you'll be able to do this Within it's own schema, validators etc, but if you want to validate the app inside the app, or another component, just use
v.string()thanks, but this way the validator is to permissive allowing every string value
You could validate the id inside the compoenent function by doing something like this if you want:
this doesn't check if the item exists, it just check if the type of Id is valid
also see this
https://discord.com/channels/1019350475847499849/1447698278538940627/1447848736343588985