feat(profile): enhance national_code uniqueness error message with masked mobile number
This commit is contained in:
@@ -222,9 +222,10 @@ class UserProfileController extends BaseController
|
||||
|
||||
$existing = $this->repository->findOneByNationalCode($code);
|
||||
if ($existing !== null && ($current === null || $existing->getUuid() !== $current->getUuid())) {
|
||||
$masked = InputValidator::maskMobile($existing->getUser()->getMobileNumber());
|
||||
return $this->error(
|
||||
ErrorCodes::ERR_PROFILE_NATIONAL_CODE_TAKEN,
|
||||
'این کد ملی قبلاً برای کاربر دیگری ثبت شده است',
|
||||
"این کد ملی قبلاً با شماره {$masked} ثبت شده است",
|
||||
409,
|
||||
'national_code'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user