Merge pull request #581 from readingdancer/Fix_for_5364_Second_Version

Fix for issue U4-5364 without trying to fix the localization of error msg.
This commit is contained in:
Shannon Deminick
2014-12-09 12:54:37 +11:00

View File

@@ -16,16 +16,16 @@ namespace Umbraco.Core.PropertyEditors
var emailVal = new EmailAddressAttribute();
if (emailVal.IsValid(asString) == false)
if (asString != string.Empty && emailVal.IsValid(asString) == false)
{
//TODO: localize these!
// TODO: localize these!
yield return new ValidationResult("Email is invalid", new[] { "value" });
}
}
public IEnumerable<ValidationResult> Validate(object value, PreValueCollection preValues, PropertyEditor editor)
{
return Validate(value, null, preValues, editor);
return this.Validate(value, null, preValues, editor);
}
}
}