M14: explain the bookmark name rules in validation errors (#6706)

This commit is contained in:
Mex authored and GitHub committed 2026-11-16 23:54:32 +01:00
1 parent 7b26a94193
commit 3bf4c05461
1 file changed
+3 -1
+3 -1
View File
@@ -188,7 +188,9 @@ pub(super) fn delete_bookmark(s: &mut Session, v: &Value) -> CmdResult {
pub(super) fn bookmark(s: &mut Session, v: &Value) -> CmdResult {
let name = p::req_str(v, "name")?.trim().to_string();
if !bookmark_name_ok(&name) {
return Err(CmdError::Params("bookmark names start with a letter, have no spaces and at most 40 characters".into()));
return Err(CmdError::Params(
"bookmark names start with a letter or underscore, contain only letters, numbers or underscores, and have at most 40 characters".into(),
));
}
// Replace an existing bookmark of the same name.
remove_bookmark(s, &name)?;