I am working on an ASP .Net web application.
One of my ASPX page contains a custom TextBox control.
3 validation controls are applied to the TextBox :
- 1 RequiredFieldValidator
- ErrorMessage="*"
- Display="Dynamic"
- ValidationGroup="IdentityRequired"
- 2 CompareValidator :
- ErrorMessage="*"
- ValidationGroup="Identity"
A custom JS function is executed when form is submitted.
The custom JS function contains the 2 following statements :
var b_RegExp = window.Page_ClientValidate('Identity');
var b_Required = window.Page_ClientValidate('IdentityRequired');
When b_Required is false then a star is displayed caused by the RequiredFieldValidator => OK !
When b_RegExp is false no star is displayed => KO !
Can anyone explain to me what is wrong please ?