Skip to main content

is_date_shaped

Function is_date_shaped 

Source
pub fn is_date_shaped(s: &str) -> bool
Expand description

Does s match the shape a Date-typed metadata value must have — YYYY-MM-DD or the ISO-8601 datetime form YYYY-MM-DDTHH:MM:SSZ?

Single source of truth for the date-shape check, shared by the CRUD write path (parse_metadata_value) and the archive-ingress strict validator (crate::validator::strict::value_matches_type). Keeping one regex means the value a memstead_create accepts and the value an import re-accepts cannot drift apart.