Skip to content

Commit b06ab90

Browse files
Merge remote-tracking branch 'remotes/github/MAGETWO-91631' into EPAM-PR-40
2 parents 940562b + 9532df6 commit b06ab90

File tree

1 file changed

+7
-2
lines changed
  • app/code/Magento/Customer/Block/Widget

1 file changed

+7
-2
lines changed

app/code/Magento/Customer/Block/Widget/Name.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __construct(
5555
}
5656

5757
/**
58-
* @return void
58+
* @inheritdoc
5959
*/
6060
public function _construct()
6161
{
@@ -245,10 +245,13 @@ public function getStoreLabel($attributeCode)
245245
*/
246246
public function getAttributeValidationClass($attributeCode)
247247
{
248-
return $this->_addressHelper->getAttributeValidationClass($attributeCode);
248+
$attributeMetadata = $this->_getAttribute($attributeCode);
249+
return $attributeMetadata ? $attributeMetadata->getFrontendClass() : '';
249250
}
250251

251252
/**
253+
* Check if attribute is required
254+
*
252255
* @param string $attributeCode
253256
* @return bool
254257
*/
@@ -259,6 +262,8 @@ private function _isAttributeRequired($attributeCode)
259262
}
260263

261264
/**
265+
* Check if attribute is visible
266+
*
262267
* @param string $attributeCode
263268
* @return bool
264269
*/

0 commit comments

Comments
 (0)