Validating query parameters #3701
-
I am trying to validate a query string parameter called
I must be doing something wrong because I get an empty response from the server with a |
Beta Was this translation helpful? Give feedback.
Answered by
thetutlage
May 1, 2022
Replies: 1 comment 1 reply
-
You have to validate it, as shown below. const schema = Schema.create({
term: Schema.string()
}) The |
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
You have to validate it, as shown below.
The
params
is not the query string. It is the route params. https://docs.adonisjs.com/guides/routing#route-parameters