pub fn is_valid_key(key: &str) -> boolExpand description
Check that an event name or property key matches
^[a-zA-Z#][A-Za-z0-9_]{0,49}$ — a 1..=50 character identifier starting
with a letter or #.
use thinkingdata_core::utils::is_valid_key;
assert!(is_valid_key("product_name"));
assert!(is_valid_key("#lib"));
assert!(!is_valid_key("9invalid"));