mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-31 09:04:59 +00:00
12 lines
No EOL
479 B
C#
12 lines
No EOL
479 B
C#
using System.Globalization;
|
|
using System.Windows.Controls;
|
|
|
|
namespace SourceGit.Views.Validations {
|
|
public class ArchiveFile : ValidationRule {
|
|
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
|
|
var path = value as string;
|
|
if (string.IsNullOrEmpty(path) || !path.EndsWith(".zip")) return new ValidationResult(false, App.Text("BadArchiveFile"));
|
|
return ValidationResult.ValidResult;
|
|
}
|
|
}
|
|
} |