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

Validator version issues cause Compiler Error #17

Closed
c650 opened this issue Jan 7, 2021 · 2 comments · Fixed by #18
Closed

Validator version issues cause Compiler Error #17

c650 opened this issue Jan 7, 2021 · 2 comments · Fixed by #18

Comments

@c650
Copy link
Contributor

c650 commented Jan 7, 2021

Hi, I was using validator 0.11 in my own project and yours uses validator 0.12. This for some strange reason I encountered a build error where the validator::traits::Validate trait was not satisfied for one of my structs.

The issue ended up being that I was deriving validator 0.11's Validate, while FromRequest on Json from this crate was using 0.12.

Please consider a pub use validator::Validate in this crate so that it is easy to use the same version of the Validate trait.

c650 added a commit to c650/actix-web-validator that referenced this issue Jan 7, 2021
@singulared
Copy link
Collaborator

Sorry for the delay.
I think it's not a problem.
But actix-web-validator use 0.12 (latest) version of validator crate.
After adding reexport, Validator trait will be from 0.12 version and you can't use it with Validator from 0.11 version anyway. But you can replace it in your code.

@Arcovv
Copy link

Arcovv commented Jan 18, 2021

validator = { version = ">=0.11, <=0.12", features = ["derive"] }

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants