Open t3ned opened 1 month ago
Is it possible to validate the length of a Vec, and the inner value such as an integer?
Vec
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
u32
#[derive(Debug, Deserialize, Validate)] struct Data { #[validate(length(min = 1, max = 10), range(min = 1, max = 100))] ids: Vec<u32> }
Not right now
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 inneru32
must fall within the range of 1-100. The code below is invalid