Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Actual Social Security Number Validation</title>
</head>
<body>
  <pre>Actual Validation (Using rules defined by the Social Security Administration)</pre>
  <input id='ssn2' value='555-55-5555' /><button onclick='actualValidate(ssn2.value);'>Validate</button>
  <br />
  
</body>
</html>
 
//Actual Validation 
function actualValidate(ssn){
      //Build your expression
      var regex = new RegExp("^(?!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