Skip to content

Commit 237ff13

Browse files
authored
Merge pull request #29
fix: remove wrong validation for national ID
2 parents d6cede5 + 61303bc commit 237ff13

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Rules/IranianNationalId.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ public function validate(string $attribute, mixed $value, Closure $fail): void
5050
$value = str_pad($value, 10, '0', STR_PAD_LEFT);
5151
}
5252

53-
if (! preg_match('/^(?!(\d)\1{9}$)[0-9]{10}$/', $value) ||
54-
! $this->isValidNationalCode($value)
55-
) {
53+
if (! $this->isValidNationalCode($value)) {
5654
$fail(Helper::translationKey('ir_national_id'))->translate();
5755
}
5856
}

0 commit comments

Comments
 (0)