enhance: support character '/' in tag name (#290)

This commit is contained in:
leo 2024-07-29 10:23:29 +08:00
parent c8b688c52d
commit 2c9c36d832
No known key found for this signature in database

View file

@ -12,7 +12,7 @@ namespace SourceGit.ViewModels
} }
[Required(ErrorMessage = "Tag name is required!")] [Required(ErrorMessage = "Tag name is required!")]
[RegularExpression(@"^[\w\-\.]+$", ErrorMessage = "Bad tag name format!")] [RegularExpression(@"^[^/]{1}[\w\-\./]*$", ErrorMessage = "Bad tag name format!")]
[CustomValidation(typeof(CreateTag), nameof(ValidateTagName))] [CustomValidation(typeof(CreateTag), nameof(ValidateTagName))]
public string TagName public string TagName
{ {