Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Commit 75ecdfb

Browse files
committed
Compatibility with Laravel 6
1 parent b63bbcf commit 75ecdfb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"illuminate/support": "^5.4 || ^6.0",
1717
"illuminate/validation": "^5.4 || ^6.0",
1818
"saritasa/php-common": "^1.0",
19-
"propaganistas/laravel-phone": "^3.0.4"
19+
"propaganistas/laravel-phone": "^3.0 || ^4.0 || ^5.0"
2020
},
2121
"require-dev": {
2222
"mockery/mockery": "^0.9",

src/StringRuleSet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ public function __construct(array $rules = [])
5454
*/
5555
public function regex(string $pattern, bool $ignoreCase = false): StringRuleSet
5656
{
57-
if (!starts_with($pattern, '/')) {
57+
if (!Str::startsWith($pattern, '/')) {
5858
$pattern = "/$pattern/";
5959
}
60-
if ($ignoreCase && !ends_with('i', $pattern)) {
60+
if ($ignoreCase && !Str::endsWith('i', $pattern)) {
6161
$pattern .= 'i';
6262
}
6363
return $this->appendIfNotExists("regex:$pattern");

0 commit comments

Comments
 (0)