Instagram

About Me

Photo Profile
Meetanshi Architecture Designer

Meetanshi is found based on providing the best Magento Extensions and Customized eCommerce Business Solutions perfected to the users’ needs. Our Happy users make us Happy. Complete satisfaction to our clients is what drives and motivates us to work hard. Read More

Thursday, June 30, 2022

How to Add Custom JS Validation Rule in Magento 2

Adding a custom JS validation rule in Magento 2 can help you protect your store from fake registrations and spam.

Internet is full of bad guys who want to harm other businesses through various tactics. One such method is spamming and fake account generation. If you are an online store owner, you may implement a solid form validation functionality to protect your store from the spammers and processing an unnecessary data.


The default Magento 2 form fields do not come with the validation facility and therefore you may require to add custom JS validation rule in Magento 2 programmatically.


Doing so will eliminate the spammers and robots from auto-signing up on your store by entering trash data. In order to do that, you need to add requirejs-config .js file and add the custom validation to the rules .js file in the backend.


You can read the complete solution at https://meetanshi.com/blog/add-custom-js-validation-rule-in-magento-2/


No comments:
Write comments


Get more of our update !