i am trying to validate fields in modalbox however its not working below is my validation code
$("#formapplication").validate({
rules: {
tb_name:{ required: true },
tb_url: {required: true},
tb_tag: {required: true},
tb_desc: {required: true},
tb_catg: {required: true}
},
messages:{
tb_name:{ required: "Please Enter Full name" },
tb_url: {required: "Please Enter URL"},
tb_tag: {required: "Please Enter Tag."},
tb_desc: {required: "Please Enter Description."},
tb_catg: {required: "Please Select Category."}
}
});
jquery validation plugin support modalbox but its simple html i write on same page not calling using ajax any idea pelase help.
below is xhtml
<div id="submitapplication" style="display:none">
<form action="" id="formapplication" name="formapplication" method="post">
<div class="submitapplicationbox">
<label>Name<input type="text" name="tb_name" id="tb_name" /></label>
<label>Url<input type="text" name="tb_url" id="tb_url" /></label>
<label>Tags<input type="text" name="tb_tag" id="tb_tag" /></label>
<label>Category<select name="select" id="tb_catg">
<option value=""></option>
</select></label>
<label>Description
<textarea cols="" rows="" name="tb_desc" id="tb_desc" ></textarea></label>
</div>
<div class="twiteraccountinfobox">
<label>Name<input type="text" name="tb_twaccount" id="tb_twaccount" /></label>
<div style="margin-top:20px;"><input type="button" id="submitapp" value="Submit Application" /></div>
<div id="response" style="display:none;"></div>
</div>