Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a middleware function to validate query params #1

Open
rahuldahal opened this issue Jun 13, 2023 · 0 comments
Open

Implement a middleware function to validate query params #1

rahuldahal opened this issue Jun 13, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@rahuldahal
Copy link
Member

Feature Request Description

Create a function in the [middleware] file to check if query params and strings exist or not. Also, check if they match the expected pattern.

Use Case

For example in these three c1, c2 and, c3 controllers, the validation is done in the controller themselves. The same validation is repeated three times

Proposed Solution

Create a middleware file here and check if query params and strings exist or not. Also, check if they match the expected pattern.

Benefits

Makes the code DRY and have a Single Point of Truth

Current Workarounds (if applicable)

[Explain any existing workarounds or alternative approaches that users may currently use]

Additional Information

[Add any additional information or context that may be helpful for understanding the feature request]

@rahuldahal rahuldahal added the enhancement New feature or request label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants