Guys,
I am running some custom validation on an Add Form.
The validation check is working. However the "return false;" is not preventing the submission of the form. What am I doing wrong.
// Credit Card Validation Processing for Member Add Credit Card // Date 30 December 2014. BETA RElease // Your app's ViewID and FieldID will need updated. $(document).on('knack-view-render.view_429', function(event, view, data) {$("#view_429 .kn-submit input[type=submit]").on(“click”, function() {
// Check That Credit Card Number is Numeric
var ccn = $("#field_180").val();
if (isNaN(ccn)) {
alert (“Credit Card Number is invalid”);
return false;
}// Check That Credit Card CCV Number is Numeric var ccv = $("#field_183").val(); if (isNaN(ccv)) { alert ("Secuirty Code must be a 3 digit number"); return false; } else if ((ccv < 99) || (ccv > 1000)) { alert ("Secuirty Code must be a 3 digit number"); return false; } // Check Validity of Date Field var ccdate = $("#field_181").val(); alert (ccdate);
})
})