Function validate_length
Source pub fn validate_length(
value: &str,
min_len: Option<usize>,
max_len: Option<usize>,
field_name: &str,
) -> Result<()>
Expand description
Validates string length constraints
§Arguments
value
- The string to validate
min_len
- Minimum length (optional)
max_len
- Maximum length (optional)
field_name
- Name of the field for error messages
§Returns
Result indicating whether the string length is valid