Skip to content

Commit 58dece9

Browse files
committed
Add tests for phoneUK method
1 parent 45154af commit 58dece9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/methods.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,15 @@ test("phone (us)", function() {
553553
ok(!method( "212 123 4567" ), "Invalid us phone number" );
554554
});
555555

556+
test("phoneUK", function() {
557+
var method = methodTest("phoneUK");
558+
ok( method( "07222 555555" ), "Valid UK Phone Number" );
559+
ok( method( "(07222) 555555" ), "Valid UK Phone Number" );
560+
ok( method( "+44 7222 555 555" ), "Valid UK Phone Number" );
561+
ok(!method( "7222 555555" ), "Invalid UK Phone Number" );
562+
ok(!method( "+44 07222 555555" ), "Invalid UK Phone Number" );
563+
});
564+
556565
test("mobileUK", function() {
557566
var method = methodTest("mobileUK");
558567
ok( method( "07734234323" ), "Valid UK Mobile Number" );

0 commit comments

Comments
 (0)