-
I am building a server-rendered app and I have a dynamic form on the frontend (with Alpine) where the user can add new rows of inputs via Javascript. So I cannot tell in advance how many rows will be submitted. The shape of each row is the same. How would I go about validating the inputs in each row? |
Beta Was this translation helpful? Give feedback.
Answered by
galaczi
Jun 10, 2022
Replies: 1 comment 1 reply
-
So if I give the same name to the inputs in each row, Adonis puts the values from the same named input in an array. So I can just loop over each array picking out the values for each row. Is this a common practice? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
galaczi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So if I give the same name to the inputs in each row, Adonis puts the values from the same named input in an array. So I can just loop over each array picking out the values for each row. Is this a common practice?