In 0.16.1 the validation error report uses the renamed property name when using #[serde(rename = "...")], but in 0.17.0 the original property name is used.
#[derive(Debug, serde::Deserialize, validator::Validate)]
pub struct User {
#[validate(length(min = 1, message = "too short"))]
#[serde(rename = "firstName")]
pub first_name: Option<String>,
}
In 0.16.1 the error report says firstName: too short, but in 0.17.0 it's first_name: too short. This is problematic since the firstName is what is actually expected to be sent from the client, not first_name.
In 0.16.1 the validation error report uses the renamed property name when using
#[serde(rename = "...")], but in 0.17.0 the original property name is used.In 0.16.1 the error report says
firstName: too short, but in 0.17.0 it'sfirst_name: too short. This is problematic since thefirstNameis what is actually expected to be sent from the client, notfirst_name.