/// <summary> /// Check if validation rule is valid /// </summary> private void CheckRule(IValidationRule validationRule) { if (!validationRule.Validate()) { if (validationRule.ValidationType == ValidationType.Error) { ValidationResult.Errors.Add(validationRule.GetMessage()); } else { ValidationResult.Warnings.Add(validationRule.GetMessage()); } } }