Skip to main content

range

Function range 

Source
pub fn range(
    schema: Value,
    minimum: Option<Value>,
    maximum: Option<Value>,
) -> Value
Expand description

schema with its bounds narrowed to minimum and maximum, those given: #[schema(range(min = 1, max = 100))] on a field. A number’s range is its value’s, a text’s its length (minLength, maxLength) and a list’s its number of items. An optional field’s bounds go on its value’s alternative.