implement jquery Plugin add method Validation

Posted by Eyla on Stack Overflow See other posts from Stack Overflow or by Eyla
Published on 2010-03-15T17:31:58Z Indexed on 2010/03/15 22:59 UTC
Read the original article Hit count: 169

Filed under:
|

I have a problem to use jquery Plugin/Validation.

I want to add a method and follow the documentation but I think I still missing some thing.

First I add the method but I think I have a problem to implement it.

please check my code and advice me.

   <script src="js/jquery-1.4.1.js" type="text/javascript"></script>

    <script src="js/jquery.validate.js" type="text/javascript"></script>


    <script type="text/javascript">



        $(document).ready(function() {

        jQuery.validator.addMethod("domain", function(value, element) {
            return this.optional(element) || /^http:\/\/yahoo.com/.test(value);
        }, "Please specify the correct domain for your documents");



            $("#aspForm").validate();
        });

   <asp:TextBox ID="TextBox1" runat="server" CssClass="domain" ></asp:TextBox>


</script>

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery