sourcegit/src/Views/Validations/CommitMessage.cs

14 lines
482 B
C#
Raw Normal View History

2021-04-29 05:05:55 -07:00
using System.Globalization;
using System.Windows.Controls;
namespace SourceGit.Views.Validations {
public class CommitMessage : ValidationRule {
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
var subject = value as string;
return string.IsNullOrWhiteSpace(subject)
? new ValidationResult(false, App.Text("EmptyCommitMessage"))
2021-04-29 05:05:55 -07:00
: ValidationResult.ValidResult;
}
}
}