Function validator::validate_length[][src]

#[must_use]pub fn validate_length<T: HasLen>(
    value: T,
    min: Option<u64>,
    max: Option<u64>,
    equal: Option<u64>
) -> bool

Validates the length of the value given. If the validator has equal set, it will ignore any min and max value.

If you apply it on String, don’t forget that the length can be different from the number of visual characters for Unicode