validate
Shape checks for common user-facing formats: pragmatic subsets that catch real mistakes, not full grammars. None of them normalizes or parses the value, only checks it.
Install
Section titled “Install”Cargo feature validate (enabled by default). To compile only this module:
or in Cargo.toml:
Import path: helpers4::validate.
| Item | What it does |
|---|---|
is_slug | Checks whether s has the shape of an ASCII URL slug: non-empty, made only of lowercase ASCII letters, digits and hyphens, with no leading, trailing or doubled hyphen. |
is_uuid | Checks whether s is a UUID in its canonical 8-4-4-4-12 hyphenated hexadecimal form. |
is_valid_email | Checks a pragmatic subset of RFC 5322 that catches real typos, not a full grammar. |
