Skip to content

Commit a87957d

Browse files
authored
refactor: use mb_strlen instead of Str::length
1 parent a20b2d2 commit a87957d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Rules/IranianNationalId.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Closure;
66
use Illuminate\Contracts\Validation\ValidationRule;
7-
use Illuminate\Support\Str;
87
use Sadegh19b\LaravelPersianValidation\Support\Helper;
98

109
class IranianNationalId implements ValidationRule
@@ -74,7 +73,7 @@ public function validate(string $attribute, mixed $value, Closure $fail): void
7473
*/
7574
protected function isValidNationalCode(string $value): bool
7675
{
77-
if (Str::length($value) !== 10) {
76+
if (mb_strlen($value) !== 10) {
7877
return false;
7978
}
8079

0 commit comments

Comments
 (0)