leonabison
New Member
How can I make the ValidationSummary control display only unique error messages?I am using a \[code\]Repeater\[/code\] to do CRUD operations and using validation controls (inside \[code\]ItemTemplate\[/code\]) for some of the fields. For example a \[code\]RequiredFieldValidator\[/code\] for First Name/Last Name columns. I set \[code\]Text="*"\[/code\] on the validators so it would be easy to spot where the validation fails. In \[code\]ValidationSummary\[/code\] there should be 1 error message for each column in which at least 1 validator fails.The problem is that \[code\]ValidationSummary\[/code\] will show the same message for each row in which a validation fails (which is expected behavior, but it would be nice to be able to remove the duplicate error messages).Example, assuming 2 rows and no data entered:\[quote\] First name is required First name is required Last name is required Last name is required\[/quote\]Instead of the expected behaviour:\[quote\] First name is required Last name is required\[/quote\]One solution I found is to use a CustomValidator outside the \[code\]Repeater\[/code\] for each column and place them in the same \[code\]ValidationGroup\[/code\] as the \[code\]ValidationSummary\[/code\] but I am thinking there must be a better solution.