April 27, 2019 / Nirav Shah
Validation Rules to Prevent Spam Account Registration in Magento 1 and Magento 2 Store
Customer registration form in Magento 1 and Magento 2 often fall the victims of spam attacks which may harm the quality of data in the customer database management systems, therefore, making it difficult for the admin to identify their real customers.
As a result, These attacks can overwhelm your Magento 1 and Magento 2 store and have a negative impact on the search engine rankings.
Based on experience with Magento 1 and Magento 2 stores, the target email domains for these spam mails are @mail.ru, @gmail.ru, @list.ru and many more.
The fake account registrations are very easy to spot, they contain advertising text and links in the name and address details with the hope that the email address they enter will then give visibility to their links.
Fake User Registration bots simply bypass captcha.
There is a solution you can implement to prevent spam/fake account registration in Magento 1 and Magento 2 Store.
Solution
We need to update field āvalidate_rulesā from the database.
Find the table name with ācustomer_eav_attributeā, update record with attribute_id=5(first name) and attribute_id=7(last name) and replace 255 with 25.
So Before updating the record :
Magento 1:
a:2:{s:15:”max_text_length”;i:255;s:15:”min_text_length”;i:1;}
Magento 2:
{“max_text_length”:255,”min_text_length”:1}
After updated record :
Magento 1:
a:2:{s:15:”max_text_length”;i:25;s:15:”min_text_length”;i:1;}
Magento 2:
{“max_text_length”:25,”min_text_length”:1}
Customer Registration Page
Checkout Page Customer Registration
As a Director of Eternal Web Private Ltd an AWS consulting partner company, Nirav is responsible for its operations. AWS, cloud-computing and digital transformation are some of his favorite topics to talk about.Ā His key focus is to help enterprises adopt technology, to solve their business problem with the right cloud solutions.
Have queries about your project idea or concept? Please drop in your project details to discuss with our AWS Global Cloud Infrastructure service specialists and consultants.