Validation Summary repeated errors

3 posts, 0 answers
  1. jen
    jen avatar
    63 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
    Admin
    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?

    Regards,
    Boris Penev
    Telerik
     
    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. DevCraft banner
  4. jen
    jen avatar
    63 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