Update lib.rs

This commit is contained in:
RustDesk authored and GitHub committed 2025-02-15 18:41:34 +08:00
1 parent 8b6700a33f
commit f9a10eaa1f
1 file changed
+1 -1
+1 -1
View File
@@ -240,7 +240,7 @@ where
} }
pub fn is_valid_custom_id(id: &str) -> bool { pub fn is_valid_custom_id(id: &str) -> bool {
regex::Regex::new(r"^[a-zA-Z]\w{5,15}$") regex::Regex::new(r"^[a-zA-Z][\w-]{5,15}$")
.unwrap() .unwrap()
.is_match(id) .is_match(id)
} }