On multi-page forms, Basic Address fields that are positioned inside pages with #states settings inherit the page's states:
<input data-drupal-selector="edit-basic-address-address" type="text" id="edit-basic-address-address" name="basic_address[address]" value="" size="60" maxlength="255" class="form-text form-item__textfield" data-drupal-states="{"required":{".webform-submission-webform-error-add-form :input[name=\u0022should_we_show_page_two\u0022]":{"checked":true}}}">
Since the field that serves as the source of the state is on a previous page, the Basic Address' subfields never get set to required.
YAML:
page_1:
'#type': wizard_page
'#title': 'Page One'
should_we_show_page_two:
'#type': checkbox
'#title': 'Should we show page two?'
'#description': 'Check this box to move on to page two.'
'#required': true
page_2:
'#type': wizard_page
'#title': 'Page Two'
'#open': true
'#states':
visible:
':input[name="should_we_show_page_two"]':
checked: true
'#states_clear': false
basic_address:
'#type': webform_address
'#title': 'Basic Address'
'#description': 'The subfields on this Basic Address block are set to be required, but instead are inheriting the conditional #states settings from the Page element for their required settings. Because the checkbox is on the previous page, none of the fields are actually required.'
'#address__required': true
'#address_2__required': true
'#city__required': true
'#state_province__required': true
'#postal_code__required': true
'#country__access': false
Basic Address subfields should reflect their own requirement settings regardless of parent container's states.
Needs work
6.2
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.