Skip to main content

validate_value

Function validate_value 

Source
pub fn validate_value(value: &Value) -> Result<(), Vec<ValidationError>>
Expand description

Validate value against the embedded JSON Resume v1.0.0 schema.

Returns Ok(()) on success. On failure, returns Err with at least one ValidationError; order matches the underlying validator’s iteration order and is not otherwise sorted or de-duplicated.

The compiled schema validator is cached in a process-wide OnceLock; the first call pays the compile cost, subsequent calls are cheap.

§Panics

Panics only if the embedded schema itself fails to parse or compile, which would indicate a build-time bug (the schema is frozen in the binary per CONSTITUTION.md §6.1). A schema-embedding regression test in tests/ guards this.