Add phone number validation for non-numeric characters

This commit is contained in:
dinamiko 2022-06-22 10:48:56 +02:00
parent d7363a0d44
commit fcf9b6b19e
2 changed files with 198 additions and 115 deletions

311
composer.lock generated
View file

@ -515,16 +515,16 @@
},
{
"name": "symfony/polyfill-php80",
"version": "v1.24.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
"reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
"reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
"shasum": ""
},
"require": {
@ -533,7 +533,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -591,7 +591,7 @@
"type": "tidelift"
}
],
"time": "2021-09-13T13:58:33+00:00"
"time": "2022-05-10T07:21:04+00:00"
},
{
"name": "wikimedia/composer-merge-plugin",
@ -809,12 +809,12 @@
}
},
"autoload": {
"psr-4": {
"Amp\\ByteStream\\": "lib"
},
"files": [
"lib/functions.php"
]
],
"psr-4": {
"Amp\\ByteStream\\": "lib"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -1096,16 +1096,16 @@
},
{
"name": "composer/semver",
"version": "3.2.9",
"version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649"
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/a951f614bd64dcd26137bc9b7b2637ddcfc57649",
"reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649",
"url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9",
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9",
"shasum": ""
},
"require": {
@ -1168,20 +1168,20 @@
"type": "tidelift"
}
],
"time": "2022-02-04T13:58:43+00:00"
"time": "2022-04-01T19:23:25+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "2.0.4",
"version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "0c1a3925ec58a4ec98e992b9c7d171e9e184be0a"
"reference": "9e36aeed4616366d2b690bdce11f71e9178c579a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/0c1a3925ec58a4ec98e992b9c7d171e9e184be0a",
"reference": "0c1a3925ec58a4ec98e992b9c7d171e9e184be0a",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a",
"reference": "9e36aeed4616366d2b690bdce11f71e9178c579a",
"shasum": ""
},
"require": {
@ -1229,7 +1229,7 @@
"type": "tidelift"
}
],
"time": "2022-01-04T17:06:45+00:00"
"time": "2022-02-24T20:20:32+00:00"
},
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
@ -1337,29 +1337,30 @@
},
{
"name": "doctrine/instantiator",
"version": "1.4.0",
"version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^8.0",
"doctrine/coding-standard": "^9",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.22"
},
"type": "library",
"autoload": {
@ -1384,7 +1385,21 @@
"constructor",
"instantiate"
],
"time": "2020-11-10T18:47:58+00:00"
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
"type": "custom"
},
{
"url": "https://www.patreon.com/phpdoctrine",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
"type": "tidelift"
}
],
"time": "2022-03-03T08:28:38+00:00"
},
{
"name": "felixfbecker/advanced-json-rpc",
@ -1429,16 +1444,16 @@
},
{
"name": "felixfbecker/language-server-protocol",
"version": "1.5.1",
"version": "v1.5.2",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-language-server-protocol.git",
"reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730"
"reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730",
"reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730",
"url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842",
"reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842",
"shasum": ""
},
"require": {
@ -1477,7 +1492,7 @@
"php",
"server"
],
"time": "2021-02-22T14:02:09+00:00"
"time": "2022-03-02T22:36:06+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@ -1593,37 +1608,38 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.10.2",
"version": "1.11.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
"conflict": {
"doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
},
"require-dev": {
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
},
"files": [
"src/DeepCopy/deep_copy.php"
]
],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -1637,7 +1653,13 @@
"object",
"object graph"
],
"time": "2020-11-13T09:40:50+00:00"
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
],
"time": "2022-03-03T13:19:32+00:00"
},
{
"name": "netresearch/jsonmapper",
@ -1687,16 +1709,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.13.2",
"version": "v4.14.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "210577fe3cf7badcc5814d99455df46564f3c077"
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077",
"reference": "210577fe3cf7badcc5814d99455df46564f3c077",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
"shasum": ""
},
"require": {
@ -1735,7 +1757,7 @@
"parser",
"php"
],
"time": "2021-11-30T19:35:32+00:00"
"time": "2022-05-31T20:59:12+00:00"
},
{
"name": "openlss/lib-array2xml",
@ -1890,24 +1912,24 @@
},
{
"name": "php-stubs/woocommerce-stubs",
"version": "v5.9.0",
"version": "v5.9.1",
"source": {
"type": "git",
"url": "https://github.com/php-stubs/woocommerce-stubs.git",
"reference": "a7204cfbb5fa90720773122cb68530087de5bc78"
"reference": "486ccff117badfab94c404065d37a77d632d7db5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/a7204cfbb5fa90720773122cb68530087de5bc78",
"reference": "a7204cfbb5fa90720773122cb68530087de5bc78",
"url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/486ccff117badfab94c404065d37a77d632d7db5",
"reference": "486ccff117badfab94c404065d37a77d632d7db5",
"shasum": ""
},
"require": {
"php-stubs/wordpress-stubs": "^5.3.0"
},
"require-dev": {
"giacocorsiglia/stubs-generator": "^0.5.0",
"php": "~7.1"
"php": "~7.1",
"php-stubs/generator": "^0.8.0"
},
"suggest": {
"symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
@ -1926,20 +1948,20 @@
"woocommerce",
"wordpress"
],
"time": "2021-11-05T10:02:27+00:00"
"time": "2022-04-30T06:35:48+00:00"
},
{
"name": "php-stubs/wordpress-stubs",
"version": "v5.9.0",
"version": "v5.9.3",
"source": {
"type": "git",
"url": "https://github.com/php-stubs/wordpress-stubs.git",
"reference": "0fa8dd9a1bd2a1b60e85afc6c798fca1f599cc1b"
"reference": "18d56875e5078a50b8ea4bc4b20b735ca61edeee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/0fa8dd9a1bd2a1b60e85afc6c798fca1f599cc1b",
"reference": "0fa8dd9a1bd2a1b60e85afc6c798fca1f599cc1b",
"url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/18d56875e5078a50b8ea4bc4b20b735ca61edeee",
"reference": "18d56875e5078a50b8ea4bc4b20b735ca61edeee",
"shasum": ""
},
"replace": {
@ -1948,7 +1970,7 @@
"require-dev": {
"nikic/php-parser": "< 4.12.0",
"php": "~7.3 || ~8.0",
"php-stubs/generator": "^0.8.0",
"php-stubs/generator": "^0.8.1",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpstan": "^1.2"
},
@ -1969,7 +1991,7 @@
"static analysis",
"wordpress"
],
"time": "2022-01-26T00:27:45+00:00"
"time": "2022-04-06T15:33:59+00:00"
},
{
"name": "phpcompatibility/php-compatibility",
@ -2549,6 +2571,12 @@
"keywords": [
"timer"
],
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T08:20:02+00:00"
},
{
@ -2598,6 +2626,12 @@
"keywords": [
"tokenizer"
],
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"abandoned": true,
"time": "2021-07-26T12:15:06+00:00"
},
@ -2728,6 +2762,12 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T08:15:22+00:00"
},
{
@ -2792,6 +2832,12 @@
"compare",
"equality"
],
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T08:04:30+00:00"
},
{
@ -2848,6 +2894,12 @@
"unidiff",
"unified diff"
],
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T07:59:04+00:00"
},
{
@ -2901,6 +2953,12 @@
"environment",
"hhvm"
],
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T07:53:42+00:00"
},
{
@ -3072,6 +3130,12 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T07:40:27+00:00"
},
{
@ -3117,6 +3181,12 @@
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T07:37:18+00:00"
},
{
@ -3170,6 +3240,12 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T07:34:24+00:00"
},
{
@ -3212,6 +3288,12 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-30T07:30:19+00:00"
},
{
@ -3259,16 +3341,16 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.6.2",
"version": "3.7.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "5e4e71592f69da17871dba6e80dd51bce74a351a"
"reference": "1359e176e9307e906dc3d890bcc9603ff6d90619"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a",
"reference": "5e4e71592f69da17871dba6e80dd51bce74a351a",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619",
"reference": "1359e176e9307e906dc3d890bcc9603ff6d90619",
"shasum": ""
},
"require": {
@ -3306,20 +3388,20 @@
"phpcs",
"standards"
],
"time": "2021-12-12T21:44:58+00:00"
"time": "2022-06-18T07:21:10+00:00"
},
{
"name": "symfony/console",
"version": "v4.4.37",
"version": "v4.4.42",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6"
"reference": "cce7a9f99e22937a71a16b23afa762558808d587"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/0259f01dbf9d77badddbbf4c2abb681f24c9cac6",
"reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6",
"url": "https://api.github.com/repos/symfony/console/zipball/cce7a9f99e22937a71a16b23afa762558808d587",
"reference": "cce7a9f99e22937a71a16b23afa762558808d587",
"shasum": ""
},
"require": {
@ -3393,20 +3475,20 @@
"type": "tidelift"
}
],
"time": "2022-01-26T16:15:26+00:00"
"time": "2022-05-14T12:35:33+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.24.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "30885182c981ab175d4d034db0f6f469898070ab"
"reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
"reference": "30885182c981ab175d4d034db0f6f469898070ab",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
"reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
"shasum": ""
},
"require": {
@ -3421,7 +3503,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -3429,12 +3511,12 @@
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -3472,20 +3554,20 @@
"type": "tidelift"
}
],
"time": "2021-10-20T20:35:02+00:00"
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.24.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
"shasum": ""
},
"require": {
@ -3500,7 +3582,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -3552,20 +3634,20 @@
"type": "tidelift"
}
],
"time": "2021-11-30T18:21:41+00:00"
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.24.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
"reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
"reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
"reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
"shasum": ""
},
"require": {
@ -3574,7 +3656,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -3628,20 +3710,20 @@
"type": "tidelift"
}
],
"time": "2021-06-05T21:20:04+00:00"
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v1.1.11",
"version": "v1.1.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "633df678bec3452e04a7b0337c9bcfe7354124b3"
"reference": "eedb374f02031714a48848758a27812f3eca317a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/633df678bec3452e04a7b0337c9bcfe7354124b3",
"reference": "633df678bec3452e04a7b0337c9bcfe7354124b3",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/eedb374f02031714a48848758a27812f3eca317a",
"reference": "eedb374f02031714a48848758a27812f3eca317a",
"shasum": ""
},
"require": {
@ -3704,7 +3786,7 @@
"type": "tidelift"
}
],
"time": "2021-11-04T13:32:43+00:00"
"time": "2022-03-09T13:39:03+00:00"
},
{
"name": "theseer/tokenizer",
@ -3748,16 +3830,16 @@
},
{
"name": "vimeo/psalm",
"version": "4.21.0",
"version": "4.23.0",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "d8bec4c7aaee111a532daec32fb09de5687053d1"
"reference": "f1fe6ff483bf325c803df9f510d09a03fd796f88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/d8bec4c7aaee111a532daec32fb09de5687053d1",
"reference": "d8bec4c7aaee111a532daec32fb09de5687053d1",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/f1fe6ff483bf325c803df9f510d09a03fd796f88",
"reference": "f1fe6ff483bf325c803df9f510d09a03fd796f88",
"shasum": ""
},
"require": {
@ -3782,6 +3864,7 @@
"php": "^7.1|^8",
"sebastian/diff": "^3.0 || ^4.0",
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0",
"symfony/polyfill-php80": "^1.25",
"webmozart/path-util": "^2.3"
},
"provide": {
@ -3846,7 +3929,7 @@
"inspection",
"php"
],
"time": "2022-02-18T04:34:15+00:00"
"time": "2022-04-28T17:35:49+00:00"
},
{
"name": "webmozart/assert",
@ -3946,16 +4029,16 @@
},
{
"name": "woocommerce/woocommerce-sniffs",
"version": "0.1.2",
"version": "0.1.3",
"source": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce-sniffs.git",
"reference": "5566270d280a300bc24bd0cb055a8b9325afdd6b"
"reference": "4576d54595614d689bc4436acff8baaece3c5bb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/woocommerce/woocommerce-sniffs/zipball/5566270d280a300bc24bd0cb055a8b9325afdd6b",
"reference": "5566270d280a300bc24bd0cb055a8b9325afdd6b",
"url": "https://api.github.com/repos/woocommerce/woocommerce-sniffs/zipball/4576d54595614d689bc4436acff8baaece3c5bb0",
"reference": "4576d54595614d689bc4436acff8baaece3c5bb0",
"shasum": ""
},
"require": {
@ -3982,7 +4065,7 @@
"woocommerce",
"wordpress"
],
"time": "2022-01-21T20:13:23+00:00"
"time": "2022-02-17T15:34:51+00:00"
},
{
"name": "wp-coding-standards/wpcs",

View file

@ -347,7 +347,7 @@ class PayUponInvoice {
}
$national_number = filter_input( INPUT_POST, 'billing_phone', FILTER_SANITIZE_STRING );
if ( $national_number && ! preg_match( '/^[0-9]{1,14}?$/', $national_number ) ) {
if ( $national_number && ! preg_match( '/^[0-9]{1,14}?$/', preg_replace( '/[^0-9]/', '', $national_number ) ) ) {
$errors->add( 'validation', __( 'Phone number size must be between 1 and 14', 'woocommerce-paypal-payments' ) );
}
},