From a23d42bb0d5940f6842a32ffafd7ece2251b31a8 Mon Sep 17 00:00:00 2001 From: mgarcia Date: Tue, 24 May 2016 18:47:46 +0200 Subject: [PATCH] Add dafault context on ValidateObjectAttribute when is Null --- HermaFx.DataAnnotations/ValidateObjectAttribute.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/HermaFx.DataAnnotations/ValidateObjectAttribute.cs b/HermaFx.DataAnnotations/ValidateObjectAttribute.cs index 3664e83..793248a 100644 --- a/HermaFx.DataAnnotations/ValidateObjectAttribute.cs +++ b/HermaFx.DataAnnotations/ValidateObjectAttribute.cs @@ -83,6 +83,7 @@ private IEnumerable ValidateProperties(object value, Validatio protected override ValidationResult IsValid(object value, ValidationContext context) { + context = context ?? new ValidationContext(value); var seen = TryGetSeenHashFrom(context); //_Log.DebugFormat("Trying to validate {0}", value.ToString());