22 protected function _validateCustomer(
$response)
29 $customer = $this->customerDataFactory->create();
31 $customerForm = $this->_formFactory->create(
37 $customerForm->setInvisibleIgnored(
true);
42 unset(
$data[
'website_id']);
45 $this->dataObjectHelper->populateWithArray(
48 \
Magento\Customer\Api\Data\CustomerInterface::class
50 $submittedData = $this->
getRequest()->getParam(
'customer');
51 if (isset($submittedData[
'entity_id'])) {
52 $entity_id = $submittedData[
'entity_id'];
55 $errors = $this->customerAccountManagement->validate(
$customer)->getMessages();
88 if (
$index ==
'_template_') {
92 $addressForm = $this->_formFactory->create(
'customer_address',
'adminhtml_customer_address');
94 $requestScope = sprintf(
'address/%s',
$index);
95 $formData = $addressForm->extractData($this->
getRequest(), $requestScope);
97 $errors = $addressForm->validateData($formData);
101 $messages[] = $error;
116 $response = new \Magento\Framework\DataObject();
123 $resultJson = $this->resultJsonFactory->create();
_validateCustomerAddress($response)