Validator version issues cause Compiler Error
c650 opened this issue · comments
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 struct
s.
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.
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.
validator = { version = ">=0.11, <=0.12", features = ["derive"] }
Thanks