Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js nepali phone number validation 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))
Comment

PREVIOUS NEXT
Code Example
Javascript :: tinymce editor description value is not getting onclick js 
Javascript :: supertest formdata 
Javascript :: JavaScript max 32-bit integer 
Javascript :: hash_hmac javascript 
Javascript :: webpack dev srcipt 
Javascript :: option component in react js errors 
Javascript :: ojs link contact page 
Javascript :: ease between 2 points 
Javascript :: reverse array in javascript 
Javascript :: normal function vs arrow function in javascript 
Javascript :: javascript unary plus and negation operators 
Javascript :: flutter local json storage 
Javascript :: js set value in object only if defined 
Javascript :: open link in a new tab progmatically 
Javascript :: snackbar in react 
Javascript :: loading screen html css js 
Javascript :: react native uid 
Javascript :: Yan Nesting For Loops 
Javascript :: kendo js add one day to a date 
Javascript :: extjs clone object 
Javascript :: javascript find prototype 
Javascript :: vue trigger function after certain time 
Javascript :: js create and call function 
Javascript :: Get async: false 
Javascript :: numbers split 2 
Javascript :: javaScript setMonth() Method 
Javascript :: vue back image 
Javascript :: react hotjar 
Javascript :: how to change currency in react-paypal-button-v2 
Javascript :: validate ajax nonce request wordpress 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =