Closed OmarThinks closed 3 years ago
Hi Omar,
I do not quite know what you meant by After the data have been validated by the decorator, Now the developer has to validate them again inside the route.
There are two ways of how to pass validated parameters into your route function.
when you use validate()
decorator arguments then validated parameters are accessible via request
variable
using validated function kwargs type hints gives you direct access to these validated parameters.
I thing the latter one is what you are looking for.
Jirka
Hi Jirka! That was exactly what I have meant. If God willed, When I update the README.md, I will make sure that this is very clear. Because this is what exactly what I came here to this package looking for as a developer. And I believe that other developers need this feature too. I will make very clear to them, so the package will be more usable. I will try to do my best to represent the package in the README.md file. Thank you so much.
Request change: passing the validated results to the route as parameters
I can make this change.
After the data have been validated by the decorator,
Now the developer has to validate them again inside the route.
What if I could pass them after they have clean and validated into the route.
They will be passed from the decorator to the route automatically.
And the user will not have to validate them again in the route.
So the code will look like this:
This is all what the developer will have to write. Cleaner code.
If God willed, I can make this change. I request your permission to make this change Thank you!