pub fn validate_key<T>(codes: &'static [T], key: &T) -> bool where
    T: PartialEq<T>,