{% sw_extends '@parent/storefront/component/address/address-form.html.twig' %}
{% block component_address_form %}
<div data-oo-postcodefix>
{{ parent() }}
</div>
{% endblock %}
{# Add missing class 'is-invalid' #}
{% block component_address_form_phone_number_input %}
{% if formViolations.getViolations("/phoneNumber") is not empty %}
{% set violationPath = "/phoneNumber" %}
{% elseif formViolations.getViolations("/#{prefix}/phoneNumber") is not empty %}
{% set violationPath = "/#{prefix}/phoneNumber" %}
{% endif %}
<input type="text"
class="form-control {% if violationPath %} is-invalid{% endif %}"
id="{{ idPrefix ~ prefix }}AddressPhoneNumber"
placeholder="{{ "address.phoneNumberPlaceholder"|trans|striptags }}"
name="{{ prefix }}[phoneNumber]"
value="{{ data.get('phoneNumber') }}"
{{ config('core.loginRegistration.phoneNumberFieldRequired') ? 'required="true"' }}>
{% endblock %}