JS Nepali Numer telefonu Walidacja Regex
function validateNepaliPhoneNoFormat(phoneNumber) {
let regexPhoneNo = /^[\+]?[+]?[0-9]{3}[-]?[0-9]{10}$/;
console.log(regexPhoneNo, phoneno);
if (phoneno.match(regexPhoneNo)) {
return true;
} else {
return false;
}
}
var phoneNumber = +977-9876543210;
// or
var phoneNumber = +9779876543210;
console.log(validateNepaliPhoneNoFormat(phoneNumber))
Inquisitive Ibis