feat(validation): enforce naming rules for doctors and clinics to prevent placeholders

This commit is contained in:
hamed
2026-07-19 08:38:11 +03:30
parent 44b89d7add
commit d780b5cbb6
9 changed files with 461 additions and 3 deletions
+4
View File
@@ -7,6 +7,7 @@ use App\Auth\Entity\User;
use App\DoctorService\Entity\DoctorService;
use App\Location\Entity\City;
use App\Location\Entity\Province;
use App\Shared\Util\DisplayName;
use App\Specialty\Entity\Specialty;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
@@ -142,6 +143,8 @@ class Doctor
public function __construct(User $user, string $name)
{
DisplayName::assertReal($name);
$this->uuid = Uuid::v4()->toRfc4122();
$this->user = $user;
$this->name = $name;
@@ -273,6 +276,7 @@ class Doctor
public function setName(string $v): self
{
DisplayName::assertReal($v);
$this->name = $v;
return $this;
}