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

Trip with the defaultContainer #452

Closed
chianquan opened this issue Nov 19, 2018 · 4 comments
Closed

Trip with the defaultContainer #452

chianquan opened this issue Nov 19, 2018 · 4 comments
Labels
status: awaiting answer Awaiting answer from the author of issue or PR.

Comments

@chianquan
Copy link

There is an trip using class-validator without defining the self's container.

The routing-controllers directly dependent the class-validator package , But my project not.

so I need add the class-validator package to my dependencies , so that I can easy add The limits(example:@Length(10, 20)) to my dto class.

But my denpendent class-validator is different with the routing-controllerss dependent class-validator.So they use their self's defaultContainer.
It make some confused problem that my limits not valid in controller actions.

@chianquan
Copy link
Author

Maybe routing-controllers package can move the denpendency class-validate to the peerDependencies.
That users must install class-validate himself.
Maybe the default validate switch should be false.

@fernandolguevara
Copy link

@chianquan same here! i have to fork this repo and modify the original code to avoid that kind of errors also i have to create a scoped npm package @propellerheads/routing-controllers

@github-actions
Copy link

github-actions bot commented Feb 7, 2020

Stale issue message

@github-actions github-actions bot added the status: awaiting answer Awaiting answer from the author of issue or PR. label Feb 7, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: awaiting answer Awaiting answer from the author of issue or PR.
Development

No branches or pull requests

2 participants