CustomValidator not calling javascript
<p>I am trying customvalidator control of asp.net but the problem is that it is not calling the javascript function. However it is calling the server side version of the validation method..</p>

<pre><code>          &lt;asp:CustomValidator  EnableClientScript="true"  
                ID="RegularExpressionValidatorFixedNames" runat="server"  ControlToValidate="TextBoxChapterName" 
                Text="Name not allowed" Font-Size="XX-Small"
                ValidationGroup="Name" 
                ClientValidationFunction="LQA_Validate"
                onservervalidate="RegularExpressionValidatorFixedNames_ServerValidate"&gt;   &lt;/asp:CustomValidator&gt;
</code></pre>

<p>the javascript function</p>

<pre><code>         function LQA_Validate(sender, args) {
        var re = /(?! My Ls|My As|My Qs).*/ig;
        args.IsValid = re.test(args);
    }
</code></pre>

<p>the server side method</p>

<pre><code>          protected void RegularExpressionValidatorFixedNames_ServerValidate(object source, ServerValidateEventArgs args)
{
    Regex regex = new Regex(@"^(?!My Ls|My Qs|My As).*", RegexOptions.IgnoreCase);
    args.IsValid = regex.IsMatch(args.Value);
}
</code></pre>

<p>what can be the problem is this problem because of the regex or I am doing some technical mistake?</p>
