Skip to main content

parse_attribute_value

Function parse_attribute_value 

Source
pub fn parse_attribute_value(
    label: &str,
    data_type: AttributeType,
    choices: &[String],
    raw: &str,
) -> Result<Option<Value>, AppError>
Expand description

Validates one attribute value given as text (form field, or an API value converted to text) and returns it as JSON; empty input removes the value.