Fix for issue U4-5364 without trying to fix the localization of the error text.

This commit is contained in:
Chris Houston
2014-12-08 15:16:37 +00:00
parent f60884e796
commit 6e60aa17dc

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);
}
}
}