Skip to content

Commit dd09ebe

Browse files
authored
Update IranianMobile.php
increase performance
1 parent 544f96f commit dd09ebe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rules/IranianMobile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function validate(string $attribute, mixed $value, Closure $fail): void
8989
'all' => 'ir_mobile_with_country_code',
9090
];
9191

92-
if (! array_key_exists($this->format, $formatPatterns)) {
92+
if (!isset($formatPatterns[$this->format]))
9393
throw new \InvalidArgumentException('Invalid format. valid formats are: ' .
9494
implode(', ', array_keys($formatPatterns))
9595
);

0 commit comments

Comments
 (0)