mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
13 lines
482 B
C#
13 lines
482 B
C#
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"))
|
|
: ValidationResult.ValidResult;
|
|
}
|
|
}
|
|
}
|