So in my code I have: $(document).ready(function($) {
if ($("#TextBox11").val()|| $("#TextBox12".val()) { $("#TextBox11").valid(); $("#TextBox12").valid(); }; $("#form1").validate( { errorPlacement: function(error, element) { if (element.attr("ID") == "PhoneTxtbox") error.insertAfter("#PhoneTxtbox"); if (element.attr("ID") == "TextBox11") error.insertAfter("#TextBox11"); if (element.attr("ID") == "TextBox12") error.insertAfter("#TextBox12"); }, messages: { PhoneTxtbox: { required: "*" }, TextBox11: { required: "*" }, TextBox12: { required: "*" } }, rules: { PhoneTxtbox: { required: true, phoneUS: true }, TextBox11: { required: "#TextBox12:filled" }, TextBox12: { required: true } }, debug:true }); }); I'm still not getting the results I'm lokking for. Am I doing something wrong? Thanks for the help Tom On Jan 2, 12:50 pm, brian <bally.z...@gmail.com> wrote: > On Fri, Jan 2, 2009 at 10:16 AM,tawright915<tawright...@gmail.com> wrote: > > > I'm having problems wrapping my head around how to code this: > > > I have two textboxes both are required. However if a user fills out > > one of the textboxes then the other is no longer required. > > $('#the_form').submit(function() > { > return $('#textarea_1').val() || $('#textarea_2').val(); > > }); > > Obviously, you'd want to adjust that to give some feedback to the user.