enhance: allow # character in branch name (#271)

This commit is contained in:
leo 2024-07-21 17:43:23 +08:00
parent 91801cff69
commit 9f09b8e326
3 changed files with 3 additions and 3 deletions

View file

@ -6,7 +6,7 @@ namespace SourceGit.ViewModels
public class CreateBranch : Popup
{
[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))]
public string Name
{

View file

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

View file

@ -12,7 +12,7 @@ namespace SourceGit.ViewModels
}
[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))]
public string Name
{