Skip to main content

validate

Function validate 

Source
pub fn validate(
    store: &UnifiedStore,
    event_name: &str,
    payload_json: &str,
) -> Result<(), ValidationError>
Expand description

Validate payload (a JSON string) against the latest schema registered for event_name. Returns Ok(()) if the payload matches; Err(ValidationError) with a typed reason otherwise.

UnknownEventName is returned when no schema is registered — the insert path treats that as “no validation, accept” for back-compat with timeseries rows that don’t carry an event_name registered yet.