0

Magento 2 in checkout page postcode, I want to restrict alphabets allowed only numbers, how can I set by using a validation XML file?

I tried below link for postcode validation number

<item name="postcode" xsi:type="array">
     <!-- post-code field has custom UI component -->
     <item name="component" xsi:type="string">Magento_Ui/js/form/element/post-code</item>
     <item name="validation" xsi:type="array">
      <item name="required-entry" xsi:type="string">true</item>
      <item name="validate-number" xsi:type="number">0</item>
    </item>
    </item>

Please help me

  • @PrathapGunasekaran I have update my question have placed Already but not worked – Pawankumar Mar 16 at 9:05
  • es onepage checkout i have place one page checkout file only – Pawankumar Mar 16 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.