Created
May 31, 2019 13:28
-
-
Save vaporic/9225c64a7aa3ed799b55646c15d9f02c to your computer and use it in GitHub Desktop.
Regex validation url - laravel
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 | |
$regex = '/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/'; | |
return [ | |
'url' => 'regex:' . $regex, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment