enhance: allow using + character in branch name (#1152)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-07 14:07:58 +08:00
parent 39f7f119dd
commit ad9021e892
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@ namespace SourceGit.ViewModels
public class CreateBranch : Popup public class CreateBranch : Popup
{ {
[Required(ErrorMessage = "Branch name is required!")] [Required(ErrorMessage = "Branch name is required!")]
[RegularExpression(@"^[\w \-/\.#]+$", ErrorMessage = "Bad branch name format!")] [RegularExpression(@"^[\w \-/\.#\+]+$", ErrorMessage = "Bad branch name format!")]
[CustomValidation(typeof(CreateBranch), nameof(ValidateBranchName))] [CustomValidation(typeof(CreateBranch), nameof(ValidateBranchName))]
public string Name public string Name
{ {

View file

@ -12,7 +12,7 @@ namespace SourceGit.ViewModels
} }
[Required(ErrorMessage = "Branch name is required!!!")] [Required(ErrorMessage = "Branch name is required!!!")]
[RegularExpression(@"^[\w \-/\.#]+$", ErrorMessage = "Bad branch name format!")] [RegularExpression(@"^[\w \-/\.#\+]+$", ErrorMessage = "Bad branch name format!")]
[CustomValidation(typeof(RenameBranch), nameof(ValidateBranchName))] [CustomValidation(typeof(RenameBranch), nameof(ValidateBranchName))]
public string Name public string Name
{ {