Jump to content


Photo

How to Add Custom JS Validation Rule in Magento 2

magento magento 2 magento 2 ecommerce magento 2 extension

  • Please log in to reply
No replies to this topic

#1 Meetanshi

Meetanshi

    Advanced Member

  • Members
  • PipPipPip
  • 535 posts

Posted 11 June 2021 - 09:56 AM

Have you ever required to set validations before serving the products or services to customers? Have you also faced the situation where the validations of default Magento 2 are not enough for your business requirement and you need to add custom JS validation rule in Magento 2?

 

Processing the data of fake or unwanted users would be a waste of time. We can restrict such kind of users by validating the contact form or any other forms using this code. You can apply custom validations like the correct format of email addresses, or the contact number of the particular country only to be allowed.

 


looking for the best presta addons with outstanding support? check this: PrestaShop Modules