Commit
The upcoming gTLD extensions will allow much more variety in TLD names. Loosen the validation to better accept different length TLDs. Fixes #3414
- Loading branch information
There are no files selected for viewing
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -38,7 +38,7 @@ class Validation { | ||
* @var array | * @var array | ||
*/ | */ | ||
protected static $_pattern = array( | protected static $_pattern = array( | ||
'hostname' => '(?:[-_a-z0-9][-_a-z0-9]*\.)*(?:[a-z0-9][-a-z0-9]{0,62})\.(?:(?:[a-z]{2}\.)?[a-z]{2,4}|museum|travel)' | 'hostname' => '(?:[-_a-z0-9][-_a-z0-9]*\.)*(?:[a-z0-9][-a-z0-9]{0,62})\.(?:(?:[a-z]{2}\.)?[a-z]{2,})' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
spiliot
Contributor
|
|||
); | ); | ||
|
|
||
/** | /** | ||
|
This makes email tests fail on expecting exceptions on long tlds, suppose we should change them to asserting no exception