JSFiddle - React, Tailwind, and code Playground

by Nayana Das

JavaScript

var pattern = /^(?:\d{10},)*\d{10}$/;
var mobile = "1234567890,2332578963,3514257896,4600012536,6677700088";
if (pattern.test(mobile)) {
            alert("yes "+mobile);
            return true;
        }
        else{
        	alert("no "+mobile);
        }