Closed astynax777 closed 1 year ago
Here is the bug:
When I tested with the DataAnnotationsValidator, everything seemed to work. I found the solution to this when looking at the DataAnnotationsValidator source. Therefore, I followed Microsoft's implementation found here in my fix:
EditContextDataAnnotationsExtensions.cs DataAnnotationsValidator.cs
Since the event handlers were in static classes, this allowed the event to be subscribed to multiple times causing increasing duplications of error messages. I found the issue when I was using the TelerikWizard and would fire off form validation, move to another step, and move back to the form again and fire validation again. It would result in the same error messages piling up each time I left and returned. This is the fix for that.