Check errors in add_subscription_dialog
This commit is contained in:
@ -14,7 +14,7 @@ fn emoji_map() -> &'static HashMap<String, String> {
|
||||
})
|
||||
}
|
||||
|
||||
fn validate_topic(topic: &str) -> Result<&str, Error> {
|
||||
pub fn validate_topic(topic: &str) -> Result<&str, Error> {
|
||||
let re = Regex::new(r"^\w+$").unwrap();
|
||||
if re.is_match(topic) {
|
||||
Ok(topic)
|
||||
|
||||
Reference in New Issue
Block a user