To just accept alphanumeric characters, letters from A to Z, numbers space and underscore, you can add an XML file that implements the validation in your checkout.
app/design/frontend/MyCompany/MyTheme/Magento_Theme/layout/checkout_index_index.xml
In this file, I added the alphanumeric
validation to the company field.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.root">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="components" xsi:type="array">
<item name="checkout" xsi:type="array">
<item name="children" xsi:type="array">
<item name="steps" xsi:type="array">
<item name="children" xsi:type="array">
<item name="shipping-step" xsi:type="array">
<item name="children" xsi:type="array">
<item name="shippingAddress" xsi:type="array">
<item name="children" xsi:type="array">
<item name="shipping-address-fieldset" xsi:type="array">
<item name="children" xsi:type="array">
<item name="region_id" xsi:type="array">...</item>
<item name="postcode" xsi:type="array">...</item>
<item name="company" xsi:type="array">
<item name="validation" xsi:type="array">
<item name="min_text_length" xsi:type="number">0</item>
<item name="max_text_length" xsi:type="number">9</item>
<item name="alphanumeric" xsi:type="boolean">true</item>
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="fax" xsi:type="array">...</item>
<item name="country_id" xsi:type="array">...</item>
<item name="telephone" xsi:type="array">...</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</body>
</page>
If you wanna see all the possible validations you can check here.