Skip to main content

normalize_bounded_display_text

Function normalize_bounded_display_text 

Source
pub fn normalize_bounded_display_text(
    field_name: &str,
    value: &str,
    max_len: usize,
) -> Result<String>
Expand description

Normalizes a short display text value.

The value is trimmed, byte-length limited, and rejected when it contains control characters. Empty values are allowed so product configuration can use an empty string as a “reset to default” signal.