rambler-digital-solutions / actix-web-validator

Rust library for providing validation mechanism to actix-web with Validator crate.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update validator version

AzHicham opened this issue · comments

Hello would it be possible to update validator version ?
I face some trait mismatch :/

Thank you

Same issue here

Stacktrace:
image

Struct:

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Validate, ToSchema)]
pub struct BudgetDTO {
    #[validate(range(min = 0))]
    pub amount: i64,
    #[validate(length(min = 1, max = 255))]
    pub name: String,
    #[validate(length(min = 0, max = 255))]
    pub description: Option<String>,
    #[serde(with = "time::serde::rfc3339")]
    #[validate(custom(function = validate_datetime_not_in_future))]
    pub created_at: OffsetDateTime,
}

For a complete example look:
https://github.com/financrr/backend/tree/dependabot/cargo/validator-0.17.0