Skip to main content

validate_numeric

Function validate_numeric 

Source
pub fn validate_numeric(
    value: &str,
    op: &str,
    threshold: f64,
) -> ConditionResult
Expand description

Validate a numeric value against a comparison.

op is one of: “==”, “!=”, “>”, “>=”, “<”, “<=” Returns Unknown if the value cannot be parsed as a number.

Example: validate_numeric(value, ">=", 0.0) for “Wert >= 0” Example: validate_numeric(value, "==", 1.0) for “Wert = 1”