mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 18:42:40 +00:00
Allow N11 exchange numbers as valid.
The previous code and commit (fa3d4a0bb5
)
were incorrect about invalid exchange numbers as 1-800-211-4511 is
a real phone number.
I've also removed a duplicate alternation pattern.
Refs #8567
This commit is contained in:
parent
13b914917d
commit
84fc9498b5
2 changed files with 2 additions and 4 deletions
|
@ -672,7 +672,7 @@ class Validation {
|
|||
// Exchange and 555-XXXX numbers
|
||||
$regex .= '(?!(555(?:\s*(?:[.\-\s]\s*))(01([0-9][0-9])|1212)))';
|
||||
$regex .= '(?!(555(01([0-9][0-9])|1212)))';
|
||||
$regex .= '([2-9]1[02-9]|[2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)';
|
||||
$regex .= '([2-9]1[02-9]|[2-9][02-9]1|[2-9][0-9]{2})\s*(?:[.-]\s*)';
|
||||
|
||||
// Local number and extension
|
||||
$regex .= '?([0-9]{4})';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue