jquery-validate

jQuery Validate: make field only required if option is selected [duplicate]

落爺英雄遲暮 提交于 2021-02-10 12:16:37
问题 This question already has an answer here : jQuery Validate - Get value from select and based on the value make text input required field (1 answer) Closed 5 years ago . I use the jQuery Validate plugin and would like to make a select field only required if another select field has a selected option. Here comes my code: HTML <form id="my-form"> <input type="text" id="myInput" name="myInput"> <select id="mySelect" name="mySelect"> <option value="">Please select</option> <option value="1">Option

jQuery Validate: make field only required if option is selected [duplicate]

只谈情不闲聊 提交于 2021-02-10 12:10:38
问题 This question already has an answer here : jQuery Validate - Get value from select and based on the value make text input required field (1 answer) Closed 5 years ago . I use the jQuery Validate plugin and would like to make a select field only required if another select field has a selected option. Here comes my code: HTML <form id="my-form"> <input type="text" id="myInput" name="myInput"> <select id="mySelect" name="mySelect"> <option value="">Please select</option> <option value="1">Option

jQuery Validate: make field only required if option is selected [duplicate]

╄→尐↘猪︶ㄣ 提交于 2021-02-10 12:10:21
问题 This question already has an answer here : jQuery Validate - Get value from select and based on the value make text input required field (1 answer) Closed 5 years ago . I use the jQuery Validate plugin and would like to make a select field only required if another select field has a selected option. Here comes my code: HTML <form id="my-form"> <input type="text" id="myInput" name="myInput"> <select id="mySelect" name="mySelect"> <option value="">Please select</option> <option value="1">Option

jQuery Validation Plugin - 'Required' rule behaving strangely

偶尔善良 提交于 2021-02-08 09:42:07
问题 I'm using this jQuery Validation Plugin (jquery-validate) in combination with Bootstrap, and I already made 5 forms with it & with a lot of pain. I now have this JSFiddle, but my password field is behaving strangely... As you can see, I set the required rule for the password, as for all. If I delete all bullets in my browser and move on to the next field, it is left untouched, if already marked correct, it remains correct, if not marked at all, remains unmarked. It isn't marked incorrect, and

jQuery Validate plugin for multiple file upload validation

删除回忆录丶 提交于 2021-02-08 08:18:13
问题 I have a file upload field, that can select and upload multiple files, I am using jquery Validate plugin for field validations, for single file upload I can successfully make use of this plugin feature, but I have no idea how to use this with multi file upload filed, Here is my html <input type="file" required="" name="design_src[]" multiple id="design_src" /> For Single file upload I am using below js, and works as intended :> $('#myForm').validate({ rules: { design_src: { required: true,

jQuery Validate plugin for multiple file upload validation

心已入冬 提交于 2021-02-08 08:17:23
问题 I have a file upload field, that can select and upload multiple files, I am using jquery Validate plugin for field validations, for single file upload I can successfully make use of this plugin feature, but I have no idea how to use this with multi file upload filed, Here is my html <input type="file" required="" name="design_src[]" multiple id="design_src" /> For Single file upload I am using below js, and works as intended :> $('#myForm').validate({ rules: { design_src: { required: true,

jQuery Validate plugin for multiple file upload validation

爱⌒轻易说出口 提交于 2021-02-08 08:17:06
问题 I have a file upload field, that can select and upload multiple files, I am using jquery Validate plugin for field validations, for single file upload I can successfully make use of this plugin feature, but I have no idea how to use this with multi file upload filed, Here is my html <input type="file" required="" name="design_src[]" multiple id="design_src" /> For Single file upload I am using below js, and works as intended :> $('#myForm').validate({ rules: { design_src: { required: true,

min max price range validation not working with jquery.validate.js

本秂侑毒 提交于 2021-02-07 11:56:13
问题 form validation i'm using https://jqueryvalidation.org. I have implemented custom validation rules through depends property. following are validation error rules: if both price box is not selected error won't show. if one price box (one out of both) selected ,validation error will show that user needs to select both. if both are selected, then max price value must be greater than min price . please find below my code: in my code every condition is satisfying but the last rule means max price

How to add validation rules with messages in jQuery validation?

久未见 提交于 2021-02-07 08:27:45
问题 I've tried below code but can't get error messages. var v = jQuery("#account_info").validate({ //errorLabelContainer: $("#result"), submitHandler: function(form) { jQuery(form).ajaxSubmit({ target: "#checkOut_error", success: function(msg) { //setTimeout("window.location='MyBids.php'", 2000); if(msg == '<?php echo OBJECT_STATUS_SUCCESS;?>') { $('#checkOut_error').html('<div class="msg msg-thanks">Bid Submitted Successfully !</div>'); //setTimeout("window.location='"+<?php echo LINK_TO_TENBID;

How to add validation rules with messages in jQuery validation?

故事扮演 提交于 2021-02-07 08:26:15
问题 I've tried below code but can't get error messages. var v = jQuery("#account_info").validate({ //errorLabelContainer: $("#result"), submitHandler: function(form) { jQuery(form).ajaxSubmit({ target: "#checkOut_error", success: function(msg) { //setTimeout("window.location='MyBids.php'", 2000); if(msg == '<?php echo OBJECT_STATUS_SUCCESS;?>') { $('#checkOut_error').html('<div class="msg msg-thanks">Bid Submitted Successfully !</div>'); //setTimeout("window.location='"+<?php echo LINK_TO_TENBID;