Permalink
Browse files

Stop throwing exceptions from validation attributes

It should simply return a validation result.
  • Loading branch information...
1 parent c6d99b2 commit 149b059746aa27acbdb66ea4753d624cd6d083ad @Haacked Haacked committed May 16, 2012
Showing with 0 additions and 3 deletions.
  1. +0 −3 ReactiveUI/Validation.cs
@@ -278,9 +278,6 @@ protected override ValidationResult IsValid(object value, ValidationContext vali
var mi = validationContext.ObjectType.GetMethod(func, BindingFlags.Public | BindingFlags.Instance);
bool result = (bool)mi.Invoke(validationContext.ObjectInstance, new[] { value });
- if (!result)
- throw new ValidationException(getStandardMessage(validationContext).ErrorMessage);
-
return result ? null : getStandardMessage(validationContext);
}
}

0 comments on commit 149b059

Please sign in to comment.