Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 7f191e8

Browse files
committed
Update phone.js
Removing 10 character limit from US phone number. Due to this, the +1 prefix was not being allowed. I guess, that was incorrect.
1 parent 218cca6 commit 7f191e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/validator/phone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
// Area code may be delimited with (), & sections may be delimited with . or -
196196
// Test: http://regexr.com/38mqi
197197
value = value.replace(/\D/g, '');
198-
isValid = (/^(?:(1\-?)|(\+1 ?))?\(?(\d{3})[\)\-\.]?(\d{3})[\-\.]?(\d{4})$/).test(value) && (value.length === 10);
198+
isValid = (/^(?:(1\-?)|(\+1 ?))?\(?(\d{3})[\)\-\.]?(\d{3})[\-\.]?(\d{4})$/).test(value);
199199
break;
200200
}
201201

0 commit comments

Comments
 (0)