private bool Validate(string nomePropriedade) { ValidationResult result = null; switch (nomePropriedade) { case "Codigo": result = Validator.GetResult(() => Codigo); break; case "Valor": result = Validator.GetResult(() => Valor); break; case "ALL": result = Validator.ValidateAll(); break; } Errors = result.AsObservableDictionary(); return(result.IsValid); }