mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 02:12:25 +08:00
fix<SubmodulePathRequiredRule>: relative path for submodule is optional.
This commit is contained in:
@@ -130,9 +130,11 @@ namespace SourceGit.Helpers {
|
||||
/// </summary>
|
||||
public class SubmodulePathRequiredRule : ValidationRule {
|
||||
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
|
||||
var regex = new Regex(@"^[\w\-\._/]+$");
|
||||
var path = value as string;
|
||||
var succ = !string.IsNullOrEmpty(path) && regex.IsMatch(path.Trim());
|
||||
if (string.IsNullOrEmpty(path)) return ValidationResult.ValidResult;
|
||||
|
||||
var regex = new Regex(@"^[\w\-\._/]+$");
|
||||
var succ = regex.IsMatch(path.Trim());
|
||||
return !succ ? new ValidationResult(false, App.Text("BadSubmodulePath")) : ValidationResult.ValidResult;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user