pub fn key( condition: bool, key_type: &'static str, reason: &'static str, ) -> Result<()>
Validate key format