Skip to content

Commit ef06b82

Browse files
MC-17925: Customer address attribute Phone validation issue
1 parent c556b2f commit ef06b82

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Customer/Model/Data/Address.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function getCompany()
119119
*/
120120
public function getTelephone()
121121
{
122-
return trim($this->_get(self::TELEPHONE));
122+
return $this->_get(self::TELEPHONE);
123123
}
124124

125125
/**
@@ -327,7 +327,7 @@ public function setCompany($company)
327327
*/
328328
public function setTelephone($telephone)
329329
{
330-
return $this->setData(self::TELEPHONE, $telephone);
330+
return $this->setData(self::TELEPHONE, trim($telephone));
331331
}
332332

333333
/**

app/code/Magento/Sales/Model/Order/Address.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ public function setEmail($email)
601601
*/
602602
public function setTelephone($telephone)
603603
{
604-
return $this->setData(OrderAddressInterface::TELEPHONE, $telephone);
604+
return $this->setData(OrderAddressInterface::TELEPHONE, trim($telephone));
605605
}
606606

607607
/**

0 commit comments

Comments
 (0)