This commit is contained in:
leo 2021-08-12 11:27:36 +08:00
parent c3c54e154b
commit 6f61c79e8b
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ namespace SourceGit.Views.Validations {
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
var name = value as string;
if (string.IsNullOrEmpty(name)) new ValidationResult(false, App.Text("EmptyBranchName"));
if (string.IsNullOrEmpty(name)) return new ValidationResult(false, App.Text("EmptyBranchName"));
if (!REG_FORMAT.IsMatch(name)) return new ValidationResult(false, App.Text("BadBranchName"));
name = Prefix + name;

View file

@ -11,7 +11,7 @@ namespace SourceGit.Views.Validations {
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
var name = value as string;
if (string.IsNullOrEmpty(name)) new ValidationResult(false, App.Text("EmptyTagName"));
if (string.IsNullOrEmpty(name)) return new ValidationResult(false, App.Text("EmptyTagName"));
if (!REG_FORMAT.IsMatch(name)) return new ValidationResult(false, App.Text("BadTagName"));
foreach (var t in Tags) {