1$(document).ready(function() { 2 3 $("#renewal-paymentmethod").on('change',function(){ 4 var pmtMethod = $(this).val(); 5 6 var paymentMethod = ["#paymentMethod-card", "#paymentMethod-cheque", "#paymentMethod-direct-debit"]; 7 $("#paymentMethod-cheque, #paymentMethod-card, #paymentMethod-direct-debit").hide(); 8 $(paymentMethod[pmtMethod-1]).fadeIn(); 9 $('.directdebitdetailinput').prop('required', pmtMethod == 3); 10 $('.directdebitdetailinput').toggleClass('required-marker required', pmtMethod == 3); 11 }) 12 13 //*************************************** 14 // Validate Change Password Form 15 $("#changepw-form").validate({ 16 rules: { 17 password_current: { 18 required: true, 19 }, 20 password_new: { 21 required: true, 22 minlength: 5 23 }, 24 password_confirm: { 25 required: true, 26 minlength: 5, 27 equalTo: "#password_new" 28 } 29 }, 30 messages: { 31 password_current: { 32 required: "Please enter your current password", 33 }, 34 password_new: { 35 required: "Please enter a new password" 36 }, 37 password_confirm: { 38 required: "Please type the new password in again", 39 equalTo: "Does not match the New Password" 40 } 41 } 42 }); 43 44 //*************************************** 45 // Validate Profile Form 46 47 $("#manage-profile").validate({ 48 rules: { 49 emailSendCorrespondence: { 50 required: function(element) { 51 return !$("#email2SendCorrespondence").is(':checked'); 52 } 53 }, 54 email2SendCorrespondence: { 55 required: function(element) { 56 return !$("#emailSendCorrespondence").is(':checked'); 57 } 58 }, 59 phoneHome: { 60 required: function(element) { 61 return ($("#phoneWork").val().length == 0 && $("#phoneMobile").val().length == 0); 62 } 63 }, 64 phoneWork: { 65 required: function(element) { 66 return ($("#phoneHome").val().length == 0 && $("#phoneMobile").val().length == 0); 67 } 68 }, 69 phoneMobile: { 70 required: function(element) { 71 return ($("#phoneWork").val().length == 0 && $("#phoneHome").val().length == 0); 72 } 73 }, 74 phoneWorkCountryCode: { 75 required: function(element) { 76 return $("#phoneWork").val().trim().length > 0; 77 } 78 }, 79 faxCountryCode: { 80 required: function(element) { 81 return $("#fax").val().trim().length > 0; 82 } 83 }, 84 phoneMobileCountryCode: { 85 required: function(element) { 86 return $("#phoneMobile").val().trim().length > 0; 87 } 88 }, 89 phoneHomeCountryCode: { 90 required: function(element) { 91 return $("#phoneHome").val().trim().length > 0; 92 } 93 } 94 }, 95 messages: { 96 emailSendCorrespondence: { 97 required: "Please select at least one email for correspondence" 98 }, 99 email2SendCorrespondence: { 100 required: "Please select at least one email for correspondence" 101 }, 102 phoneHome: { 103 required: "Please enter at least one phone number" 104 }, 105 phoneWork: { 106 required: "Please enter at least one phone number" 107 }, 108 phoneMobile: { 109 required: "Please enter at least one phone number" 110 } 111 } 112 }); 113 114 115 116 117 118 119});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.