Setup: Customer has an account and is logged in, but there are no default billing and shipping addresses assigned. A custom attribute has been added and isrequired when defining in setup module. The Customer is presented with an address form. This form presents and validates the custom attribute. Customer clicks next, place order screen appears showing address form with all fields, including custom attribute. Customer clicks place order, error appears stating naming the custom attribute and informing that it is a required field.
The error is created in the magento eav/model within the validateValue function of text.php Ive tried to trace starting from the Magento_Checkout js/model and action place.order modules and ending in the service urls pointing to fuction getPaymentInformation in checkout/model/PaymentInformationManagement.php but cant seem to find the line of code that is responsible for requesting this validation. The attribute is validated upon entry in all the address forms, so I dont really need it to be validated at place order. This custom attribute works fine in other cases such as guest user, or logged in user that has entered default addresses. Its just this one case. It seems to be a Magento problem, during my troubleshooting I have been able to print out the class and my coustom attribute with its values are present.
I would like this line of code where I can just ignore the validation in this particular case.