handling of blank paths during validation.

This commit is contained in:
kay.one committed 2013-08-31 13:46:59 -07:00
1 parent 9e08dffa58
commit daabc6364d
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -12,6 +12,7 @@ public PathValidator()
protected override bool IsValid(PropertyValidatorContext context)
{
if (context.PropertyValue == null) return false;
return context.PropertyValue.ToString().IsPathValid();
}
}
+1 -1
View File
@@ -50,7 +50,7 @@ public static bool PathEquals(this string firstPath, string secondPath)
public static bool IsPathValid(this string path)
{
if (path.ContainsInvalidPathChars())
if (path.ContainsInvalidPathChars() || string.IsNullOrWhiteSpace(path))
{
return false;
}