Skip to content

Commit 5958409

Browse files
committed
Correctly set required street field
1 parent 1eed0f1 commit 5958409

File tree

1 file changed

+3
-3
lines changed
  • app/code/Magento/Customer/view/frontend/templates/address

1 file changed

+3
-3
lines changed

app/code/Magento/Customer/view/frontend/templates/address/edit.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ $viewModel = $block->getViewModel();
2323
<?php $_postcodeValidationClass_value = $viewModel->addressGetAttributeValidationClass('postcode'); ?>
2424
<?php $_postcodeValidationClass = $_postcodeValidationClass_value; ?>
2525
<?php $_streetValidationClass = $viewModel->addressGetAttributeValidationClass('street'); ?>
26-
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
26+
<?php $_streetValidationClassNotRequired = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
2727
<?php $_regionValidationClass = $viewModel->addressGetAttributeValidationClass('region'); ?>
28-
2928
<form class="form-address-edit"
3029
action="<?= $block->escapeUrl($block->getSaveUrl()) ?>"
3130
method="post"
@@ -74,7 +73,8 @@ $viewModel = $block->getViewModel();
7473
value="<?= $block->escapeHtmlAttr($block->getStreetLine($_i + 1)) ?>"
7574
title="<?= $block->escapeHtmlAttr(__('Street Address %1', $_i + 1)) ?>"
7675
id="street_<?= /* @noEscape */ $_i + 1 ?>"
77-
class="input-text <?= $block->escapeHtmlAttr($_streetValidationClass) ?>">
76+
class="input-text
77+
<?= $block->escapeHtmlAttr($_streetValidationClassNotRequired) ?>">
7878
</div>
7979
</div>
8080
<?php endfor; ?>

0 commit comments

Comments
 (0)