var TinNumber = crmForm.all.new_tin.DataValue; var regexFormat = /[0-9]{3}-[0-9]{3}-[0-9]{3}-[0-9]{3}/;
if (TinNumber is null ) { if ( ! regexFormat.test(TinNumber) ) { alert("The TIN number must match the following format: ###-###-###."); event.returnValue=false; return false; } }Zosimo D. Recio Jr.
Microsoft Certified (Business Management Solutions specialist)