pub(crate) fn valid_element(s: &str) -> Result<()>