1var ifcf7_pay = { 2 3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 5 init_fields: function(element){ 6 jQuery(element).find('input[name="ifcf7_cc_cvv"]').inputmask({ 7 clearIncomplete: true, 8 oncomplete: function(){ 9 if(Inputmask.isValid(jQuery(this).val(), { 10 regex: '[0-9]{3}', 11 })){ 12 jQuery(this).blur(); 13 } 14 }, 15 regex: '[0-9]{3}', 16 }); 17 jQuery(element).find('input[name="ifcf7_cc_exp"]').inputmask({ 18 clearIncomplete: true, 19 oncomplete: function(){ 20 if(Inputmask.isValid(jQuery(this).val(), { 21 regex: '(0[1-9]|1[012])/[0-9]{2}', 22 })){ 23 if(!jQuery(element).find('input[name="ifcf7_cc_cvv"]').val()){ 24 jQuery(element).find('input[name="ifcf7_cc_cvv"]').focus(); 25 } else { 26 jQuery(this).blur(); 27 } 28 } 29 }, 30 regex: '(0[1-9]|1[012])/[0-9]{2}', 31 }); 32 jQuery(element).find('input[name="ifcf7_cc_num"]').inputmask({ 33 clearIncomplete: true, 34 oncomplete: function(){ 35 if(Inputmask.isValid(jQuery(this).val(), { 36 regex: '([12456789][0-9]{3} [0-9]{4} [0-9]{4} [0-9]{4}|3[47][0-9]{2} [0-9]{6} [0-9]{5}|3[01235689][0-9]{2} [0-9]{6} [0-9]{4})', 37 })){ 38 if(!jQuery(element).find('input[name="ifcf7_cc_exp"]').val()){ 39 jQuery(element).find('input[name="ifcf7_cc_exp"]').focus(); 40 } else if(!jQuery(element).find('input[name="ifcf7_cc_cvv"]').val()){ 41 jQuery(element).find('input[name="ifcf7_cc_cvv"]').focus(); 42 } else { 43 jQuery(this).blur(); 44 } 45 } 46 }, 47 regex: '([12456789][0-9]{3} [0-9]{4} [0-9]{4} [0-9]{4}|3[47][0-9]{2} [0-9]{6} [0-9]{5}|3[01235689][0-9]{2} [0-9]{6} [0-9]{4})', 48 }).on('change', function(){ 49 var value = jQuery(this).val().substr(0, 2); 50 jQuery('input[name="ifcf7_cc_cvv"]').inputmask({ 51 clearIncomplete: true, 52 oncomplete: function(){ 53 if(Inputmask.isValid(jQuery(this).val(), { 54 regex: (34 == value || 37 == value) ? '[0-9]{4}' : '[0-9]{3}', 55 })){ 56 jQuery(this).blur(); 57 } 58 }, 59 regex: (34 == value || 37 == value) ? '[0-9]{4}' : '[0-9]{3}', 60 }); 61 }); 62 }, 63 64 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 65 66 load: function(){ 67 jQuery(function($){ 68 $('.wpcf7-form').each(function(){ 69 ifcf7_pay.init_fields(this); 70 }); 71 }); 72 }, 73 74 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 75 76};
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.