Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Over-the-Top Social Security Number Validation</title>
</head>
<body>
  <pre>"Over-the-top" Validation (Handles previously mentioned rules and a few common exceptions)</pre>
  <input id='ssn3' value='555-55-5555' /><button onclick='overTheTopValidate(ssn3.value);'>Validate</button>
</body>
</html>
 
//"Over-the-top" Validation 
function overTheTopValidate(ssn){
      //Build your expression
      var regex = new RegExp("^(?!\\b(\\d)\\1+-(\\d)\\1+-(\\d)\\1+\\b)(?!123-45-6789|219-09-9999|078-05-1120)(?!666|000|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0{4})\\d{4}$");
      //Test your current value
      alert(regex.test(ssn));
}
  
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
rionmonsterpro
0viewers