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