Programming tips, tricks and advice from Jonathan Leger, a seasoned professional programmer/analyst. ASP.NET, VB.NET, Visual Basic, MS Access, MS SQL Server, PHP, MySQL, JavaScript and more! Email Me
Email Me
/* ValidSSN - true for valid SSN, false for invalid */ function ValidSSN(SSN) { var SSNum = new String(SSN); var regex = /^[0-9]{3,3}\-[0-9]{2,2}\-[0-9]{4,4}$/; return regex.test(SSNum); }