Enum validation with runtime data (VineJS) #4505
Unanswered
Barbapapazes
asked this question in
Help
Replies: 2 comments 2 replies
-
I need to try this https://vinejs.dev/docs/types/enum#defer-computing-enum-options with a field.meta |
Beta Was this translation helpful? Give feedback.
1 reply
-
Yes, you can either use Not sure what you mean by |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
My database contains an array of strings: ['JavaScript', 'TypeScript', 'Python'].
I use these data to create dynamic form where strings are the value of an HTML select.
I would use Vine to validate not only that the received data from this dynamic form is a string but also that data is in the database. I was thinking about something like with
unique
, https://docs.adonisjs.com/guides/validation#passing-metadata-to-validators, but it does not seems to exists forenum
.How could I achieve that? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions