feat: normalize email addresses to lowercase on write
This commit is contained in:
@@ -39,7 +39,9 @@ class Communication
|
||||
|
||||
public function setEmail(?string $email): static
|
||||
{
|
||||
$this->email = $email;
|
||||
// BusPro compares addresses case-insensitively; normalize on the way in so the DTO
|
||||
// carries the same shape the entities store.
|
||||
$this->email = null === $email ? null : mb_strtolower(trim($email));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user