Validation Summary repeated errors

3 posts, 0 answers
  1. jen
    jen avatar
    77 posts
    Member since:
    Jun 2009

    Posted 23 Jul 2014 Link to this post

    I am editing an object that has 5 checkboxes, and a validation rule that at least one must be checked.

    During validation I make one Validation result with multiple properties. This way, each checkbox gets a red error indicator.
     new ValidationResult("At least one Finance Type is Required", new List<string>() { "IsCash", "IsFinancePromo", "IsFinanceStandard", "IsLeasePromo", "IsLeaseStandard" });

    The problem is that in the validation summary, instead of seeing the error message once, I'm seeing it 5 times.

    How can I make the validation summary of the RadDataForm display DISTINCT ValidationResults only?
  2. Boris
    Boris avatar
    276 posts

    Posted 28 Jul 2014 Link to this post

    Hello Jen,

    Have you eventually added the error 5 times? I am not able to reproduce such an issue on this online demo.
    In order to guide you better, could you please send us a sample project that reproduces the issue?

    Boris Penev
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. jen
    jen avatar
    77 posts
    Member since:
    Jun 2009

    Posted 28 Jul 2014 in reply to Boris Link to this post

    I figured this out myself. Turns out the error appears in the validation summary once for each binding with NotifyOnValidationError=True set. I had it set on each checkbox, but in this case I only need it set on one.
Back to Top