Is it possible to validate the length of a Vec, and the inner value such as an integer?
Given this example, this Vec must have a length of 1-10, and the inner u32 must fall within the range of 1-100. The code below is invalid
#[derive(Debug, Deserialize, Validate)]
struct Data {
#[validate(length(min = 1, max = 10), range(min = 1, max = 100))]
ids: Vec<u32>
}
Is it possible to validate the length of a
Vec, and the inner value such as an integer?Given this example, this
Vecmust have a length of 1-10, and the inneru32must fall within the range of 1-100. The code below is invalid