Module validation

Module validation 

Source
Expand description

Shared validation helpers for model invariants.

Validation in this crate is intentionally lightweight: types implement the Validate trait when they can check their own invariants, and helper functions provide reusable checks for common string-based contracts.

Traits§

Validate
A model type that can verify its own invariants.

Functions§

ensure_hash
Accept hexadecimal hashes with or without a known algorithm prefix.
ensure_http_url
Accept only http and https URLs.
ensure_non_empty
Reject values that are empty after trimming whitespace.