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
httpandhttpsURLs. - ensure_
non_ empty - Reject values that are empty after trimming whitespace.