ajax jquery组验证

here is my code:

groups: {
    phone: "phone1-phone2-phone3"
   digits: true
},
errorPlacement: function(error, element) {
    if (element.attr("name") == "phone1" 
           || element.attr("name") == "phone2" || element.attr("name") == "phone3")
        error.insertAfter("#telephone");
    else
    error.insertAfter(element);
},
debug:true

here is my form input text:

<p><label for="name"><span class="red">*</span>Phone: </label> <input type="text" name="phone1" id="phone1" size="3" tabindex="12" />-<input type="text" name="phone2" id="phone2" size="3" tabindex="12" />-<input type="text" name="phone3" id="telephone" size="4" tabindex="12" /></p>

the above didnt validate? any ideas is much appreciated!

查看全部
weixin_33698823
weixin_33698823
2010/02/01 21:02
  • ajax
  • validation
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信

1个回复