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

Lacking type coercion during validation #237

Open
goldbergyoni opened this issue Oct 3, 2022 · 1 comment
Open

Lacking type coercion during validation #237

goldbergyoni opened this issue Oct 3, 2022 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@goldbergyoni
Copy link
Contributor

When validating input, it's also the right place to coerce value to their right domain type

For example, when getting req.body.userId - it's string by default, inside our domain it should be a number

Ajv supports this:
https://ajv.js.org/coercion.html

@goldbergyoni goldbergyoni added bug Something isn't working good first issue Good for newcomers labels Oct 3, 2022
@Taimoorkhan1122
Copy link

Hi, I would like to contribute to this amazing repo, is this issue still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants