I am developing asp.net web site. I have a from on a page and have text boxes. I am using Validators to validate fields. I used two validators to validate my telephone number field. One to check length and other to check All entered value are numbers
My issue is: for a invalid input which does not match above two conditions, bot the error messages are displaying.
I would like to display only 1 error message at a time. Is this possible? Please advice me.
Finally I was manage to fix my issue. using CSS
This is how I did
wrote a new css class(.errorMsg) in style sheet to handle the display style of error messages.
Assign that css class to each validator.
Now multiple error messages for invalid input is overlapped.
To fix it, I assigned background color for the error message
<span>tag. (Background color is same as forms BbColor).So now overlapped messages are not showing. only the topmost error is showing now.