0
var pattern =/1\d{10}/g 
var newValue="121"  
   if(!pattern.test(newValue)){
   alert("Error: Contains an 11-digit string starting with a 1. Example: 12345678901");
   }
Regex contains an 11-digit string starting with a 1 JavaScript
admin Changed status to publish December 26, 2023