Open dikkini opened 1 year ago
Hello @dikkini thanks for greetings.
It's mandatory to provide a validation for each filter you like to use in your query parameters because it's important for security you know.
So for:
Error: s[eq]: filter not found
It's necessary to provide:
"s": rqp.In("one", "two"), // filter: s - string and equal
For:
sort: validation not found
should be:
"sort": rqp.In("id", "name"),
and for properly working of:
id: filter not found
add to rqp.Validations
parameter:
"id:int": nil,
And just look at example in cmd/main.go
Hello! NIce library, very comprehensive functions. I've tried but i got an error from example in Readme.
URL looks like:
?sort=+name,-id&limit=10&id=1&i[eq]=5&s[eq]=one&email[like]=*tim*|name[like]=*tim*
Error:
s[eq]: filter not found
If i remove
s[eq]
parameter from url query, then i got an error:sort: validation not found
If i remove
sort
parameter from url query, then i got an error:id: filter not found
Can you tell what i'm doing wrong?