我正在利用“ j子”鉴定,试图使用户在满足多种条件的前提下不退位。 但是,所要求的选择似乎并没有保留提交的形式。
http://jsfiddle.net/5NCQg/2/“rel=“nofollow”jsFiddle。
我把检查我的酒吧法典翻了一番,似乎正在发挥作用。 jsFiddle说是有效的法典。 因此,我不敢肯定hang死是什么?
增 编
我正在利用“ j子”鉴定,试图使用户在满足多种条件的前提下不退位。 但是,所要求的选择似乎并没有保留提交的形式。
http://jsfiddle.net/5NCQg/2/“rel=“nofollow”jsFiddle。
我把检查我的酒吧法典翻了一番,似乎正在发挥作用。 jsFiddle说是有效的法典。 因此,我不敢肯定hang死是什么?
增 编
j Query.validate use name for the Rules, not ids. 因此,用贵投入领域的名称取代女胎。
您的表格还应如下:<form id=“temp1”>
,而不是<form id=“#temp”>
。
http://jsfiddle.net/5NCQg/5/“rel=“nofollow”
<form id="temp1">
<input type="text" name="HospitalFinNumber"/> Hospital Fin<br/>
<input type="text" name="DateOfBirth"/>Date of Birth<br/>
<input type="text" name="AdmitDate"/>Admit Date<br/>
<input type="text" name="Comment"/>Comment<br/>
<input type="submit" value="Save" class="button" id="btClick"/>
</form>
注
$(document).ready(function () {
$("#temp1").validate({
rules: {
HospitalFinNumber: {
required: true,
minlength: 6
},
DateOfBirth: {
required: true
},
AdmitDate: {
required: true
},
Comment: {
required: function (element) {
return $(element).val().length < 4000;
},
maxlength: 4000
}
},
messages: {
HospitalFinNumber: Please Enter a Hospital Fin number ,
DateOfBirth: Please enter a valid Date Of Birth ,
AdmitDate: Please select an Admit Date ,
Comment: Why dont you stop attempting to put in more than 4000 characters? Thanks...
}
});
});
The following code doesn t work. $(document).ready(function(){ $("#digitalchange").validate( { rules: { addbalance: { digits:true, ...
Why does not jQuery form validation plug-in work? This is the code: <form id="form2" action="comment.php?id=5" method="post"> <div>Input your own comment:</div> <textarea id="...
I am using the bassistance jQuery plugin validation. I have a drop down list with 2 values. If the first value is selected by the user a valid date field needs to be populated and if the second ...
I am pretty new to Jquery, I am using validation rule against my textbox. The problem is when i mark textbox is mandatory n user doesn t input any value then it doesn t show any validation message. I ...
If I ve added a custom validation method to my form, how can I get it to trigger prior to submit? I m not decorating my form fields but I thought that adding the new method to my rules section would ...
I have managed to implement the validator on a form, and is working fine for all my needs apart from a crucial last one. Does anyone know how I would go about (or whether it s even possible) to ...
I need to validate that atleast one check box is selected from a list of checkboxes using jQuery Validation Plugin. Since the checkboxes are part of a ASP.NET GridView Control, the names of these ...
I have a form with two input textboxes, and I have included jQuery validation rules for both: <script src="../../Scripts/jquery-validate/jquery.validate.js" type="text/javascript"></script&...