Created
February 22, 2017 08:49
-
-
Save nielsvr/329994f83804e2cc00d6765dd3ea9da0 to your computer and use it in GitHub Desktop.
Validate dutch mobile phone numbers (international notation)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Validate dutch mobile phone numbers (international notation) | |
if(!preg_match('/^\+[0-9]{1,2}[ ]\([0-9]{1}\)[ ]([0-9]{9})$/', $telephone)) { | |
$error = 'Use international notation: +31 (0) 612341234'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment