Correct the URL regex

This commit is contained in:
conory 2022-02-21 21:11:42 +09:00
parent 0c31234e09
commit 34c46a08c6

View file

@ -88,7 +88,7 @@ class Validator
$this->addRule(array(
'email' => '/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/',
'userid' => '/^[a-z]+[\w-]*[a-z0-9_]+$/i',
'url' => '/^https?:\/\/[^\\\\/]+!',
'url' => '/^https?:\/\//i',
'alpha' => '/^[a-z]*$/i',
'alpha_number' => '/^[a-z][a-z0-9_]*$/i',
'number' => '/^(?:[1-9]\\d*|0)$/',