From b03427cabc0e00caba5297297c7f1c558693847d Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 6 Dec 2013 10:07:04 +0100 Subject: [PATCH] Fixes: U4-3806 Prevalue validation run all field validators against all fields --- src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs b/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs index 2ae24717bd..6757082a49 100644 --- a/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs +++ b/src/Umbraco.Web/Editors/DataTypeValidateAttribute.cs @@ -86,8 +86,8 @@ namespace Umbraco.Web.Editors foreach (var preVal in dataType.PreValues) { var postedValue = preVal.Value; - - foreach (var v in propertyEditor.PreValueEditor.Fields.SelectMany(x => x.Validators)) + + foreach (var v in propertyEditor.PreValueEditor.Fields.Where(x => x.Key == preVal.Key).SelectMany(x => x.Validators)) { foreach (var result in v.Validate(postedValue, null, propertyEditor)) {