i'm currently stuck on making the vat id a required field for guest orders (shipping address and - if it differs - billing address).
This doesn't seem to be a configuration option ("show in frontend" only can be "yes" or "no" and not "required") and overriding "/vendor/magento/module-customer/view/base/ui_component/customer_form.xml" with
<field name="vat_id" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">address</item>
<rule name="required-entry" xsi:type="boolean">true</rule>
unfortunately didn't work either (if this is the intended way i might have done it wrong).
Any help is very appreciated!
okay - i understand - i have researched on the functionality you are asking and looks like some one did same kind of functionality previously !!
below i am sharing few links which might help you to achieve this kind of functionality !!
This is for reference - https://docs.magento.com/m2/ce/user_guide/tax/vat-validation-configure.html