8 examples of 'indian mobile number validation in android' in JavaScript

Every line of 'indian mobile number validation in android' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
7function checkMobile(phone_val){
8 var pattern=/(^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$)|(^0{0,1}1[3|4|5|6|7|8|9][0-9]{9}$)/;
9 return pattern.test(phone_val);
10}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

40function isValidPhone(value) {
41 return /^[0-9]+$/ig.test(value)
42}
28export function looksValid(phoneNumber) {
29 return PHONE_NUMBER_REGEXP.test(phoneNumber);
30}
21export function isValidLength(phone: string): boolean {
22 return phone.length >= PHONE_MIN_LENGTH && phone.length <= PHONE_MAX_LENGTH;
23}
790function isPhoneNumber(number) {
791 var regex = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
792 return regex.test(number);
793}
38export function isChinesePhoneNumber(phoneNumber: number | string, strict: boolean = false) {
39 return (
40 isChineseMobilePhoneNumber(phoneNumber, strict)
41 || isChineseLandlinePhoneNumber(phoneNumber, strict)
42 )
43}
157function isPhone(str) {
158 return /^(\+\d\d)?1\d{10}$/.test(str);
159}
52mobile() {
53 return !/^1[345789]\d{9}$/.test(this.value) && `请输入11位的手机号码`;
54}

Related snippets