Skip to content

Commit 0566870

Browse files
authored
Merge pull request #31
Increase performance of IranianMobile rule
2 parents 544f96f + dd09ebe commit 0566870

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)