diff --git a/src/Views/Validations/BranchName.cs b/src/Views/Validations/BranchName.cs index 472c2aad..6de649ca 100644 --- a/src/Views/Validations/BranchName.cs +++ b/src/Views/Validations/BranchName.cs @@ -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; diff --git a/src/Views/Validations/TagName.cs b/src/Views/Validations/TagName.cs index 20755a2a..570fe737 100644 --- a/src/Views/Validations/TagName.cs +++ b/src/Views/Validations/TagName.cs @@ -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) {