I am using asp.net validations and jquery validation for checking user input.I am using number of required field validators and custom validators in my form , i am facing a strange problem , when a field with required validator is empty , the error message is displayed on validation summary. this is all right.When the same field is left empty and wrong inputs are entered on other fields with custom validators ,, the validation summary only displays the error message of required field validator.The other error messages are just not displayed.Can anybody point me out where am i going wrong.
Thanks
I am using asp.net validations and jquery validation for checking user input.I am using
Share
Here is a code sample that uses RequiredFieldValidator together with CustomValidator. It validates both fields, as well as when one of them fails, and displays the error messages in the ValidationSummary.
The CustomValidator has OnServerValidate function in the code behind.
The .aspx markup:
and the validation function in .aspx.cs file:
In order to be able to display both error messages, and not only the RequiredFieldValidator‘s, its property ‘EnableClientScript’ should be set to false.
Hopefully, this will get you going and solve your problem.