Skip to content

Instantly share code, notes, and snippets.

var telephoneWrapper = jQuery(".telephone");
var invalidMsg = jQuery('<span class="tp-invalid" style="position:relative; color: red;">!+ TEXT page_contact telePhoneInvaliMsg htmlStrip +!</span>').appendTo("form.flexibleForm .section1");
invalidMsg.hide();
jQuery(".submit").click(function(){
var telephone = jQuery("#ff_telephone1").val();
var intRegex = /^\d+$/;
if(!intRegex.test(telephone)) {
telephoneWrapper.addClass("invalid");