Retaining Custom Validation Message OnChanged

Home / / Retaining Custom Validation Message OnChanged

I am using a gridview with CustomValidator on my different input types. Each input has its own CustomValidator. The problem I am running into is when my CustomValidator fires and my message displays, it dissapears if I have another validation error in a different row. I need to be able to retain the errors for each CustomValidator error thrown. I am adding a custom css class for each error and that is retained properly (see the red outline around the inputs).

The first image shows an error with the dropdownlist on the far right. It checks values in the other input types in the same row. This is correct.

The second image shows an error in the unit field on a different row. The validation summary only shows the error message for this unit and not the error message for the other invalid fields in the previous row.

In the end, I would like to continue seeing all validation errors where my css error class is currently active.

I have the same ValidationGroup for my CustomValidators. The error messages are showing up in the same spot. I do not want the errors to appear below the inputs.
Read more

Leave a Reply

Your email address will not be published. Required fields are marked *