From 6e60aa17dc6be66b1c8b93c4dcc67db67cef5a7d Mon Sep 17 00:00:00 2001 From: Chris Houston Date: Mon, 8 Dec 2014 15:16:37 +0000 Subject: [PATCH] Fix for issue U4-5364 without trying to fix the localization of the error text. --- src/Umbraco.Core/PropertyEditors/EmailValidator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/PropertyEditors/EmailValidator.cs b/src/Umbraco.Core/PropertyEditors/EmailValidator.cs index 0cda202756..403e26ca70 100644 --- a/src/Umbraco.Core/PropertyEditors/EmailValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/EmailValidator.cs @@ -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 Validate(object value, PreValueCollection preValues, PropertyEditor editor) { - return Validate(value, null, preValues, editor); + return this.Validate(value, null, preValues, editor); } } } \ No newline at end of file