File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
app/code/Magento/Eav/Model/Entity/Attribute/Backend
api-functional/testsuite/Magento/Customer/Api
integration/testsuite/Magento/Catalog/Controller/Adminhtml Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,8 @@ public function validate($object)
237237 && $ attribute ->isValueEmpty ($ value )
238238 && $ attribute ->isValueEmpty ($ attribute ->getDefaultValue ())
239239 ) {
240- throw new LocalizedException (__ ('The value of attribute "%1" must be set ' , $ attrCode ));
240+ $ label = $ attribute ->getFrontend ()->getLabel ();
241+ throw new LocalizedException (__ ('The value of attribute "%1" must be set ' , $ label ));
241242 }
242243
243244 if ($ attribute ->getIsUnique ()
Original file line number Diff line number Diff line change @@ -579,8 +579,8 @@ public function testValidateCustomerData()
579579 $ validationResponse = $ this ->_webApiCall ($ serviceInfo , $ requestData );
580580 $ this ->assertFalse ($ validationResponse ['valid ' ]);
581581
582- $ this ->assertEquals ('The value of attribute "firstname " must be set ' , $ validationResponse ['messages ' ][0 ]);
583- $ this ->assertEquals ('The value of attribute "lastname " must be set ' , $ validationResponse ['messages ' ][1 ]);
582+ $ this ->assertEquals ('The value of attribute "First Name " must be set ' , $ validationResponse ['messages ' ][0 ]);
583+ $ this ->assertEquals ('The value of attribute "Last Name " must be set ' , $ validationResponse ['messages ' ][1 ]);
584584 }
585585
586586 public function testIsReadonly ()
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ public function testSaveActionCategoryWithDangerRequest()
339339 );
340340 $ this ->dispatch ('backend/catalog/category/save ' );
341341 $ this ->assertSessionMessages (
342- $ this ->equalTo (['The value of attribute "name " must be set ' ]),
342+ $ this ->equalTo (['The value of attribute "Name " must be set ' ]),
343343 \Magento \Framework \Message \MessageInterface::TYPE_ERROR
344344 );
345345 }
You can’t perform that action at this time.
0 commit comments