April 27, 2019 / Nirav Shah
<strong>Validation Rules to Prevent Spam Account Registration in Magento 1 and Magento 2 Store</strong>
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.
<em>Fake User Registration bots simply bypass captcha.</em>
There is a <strong>solution you can implement to prevent spam/fake account registration in Magento 1 and Magento 2 Store.</strong>
<img class=”img-responsive” src=”https://www.eternalsoftsolutions.com/blog/wp-content/uploads/2019/04/Spam-Customer-List-1.png” />
<strong>Solution</strong>
We need to update field <strong>“validate_rules”</strong> from the database.
Find the table name with <strong>“customer_eav_attribute”</strong>, update record with attribute_id=5(first name) and attribute_id=7(last name) and replace <strong>255</strong> with <strong>25</strong>.
<strong>So Before updating the record :</strong>
<strong>Magento 1:</strong>
a:2:{s:15:”max_text_length”;i:<span style=”color: #ff0000;”>255</span>;s:15:”min_text_length”;i:1;}
<strong>Magento 2:</strong>
{“max_text_length”:<span style=”color: #ff0000;”>255</span>,”min_text_length”:1}
<strong>After updated record :</strong>
<strong>Magento 1:</strong>
a:2:{s:15:”max_text_length”;i:<span style=”color: #008000;”>25</span>;s:15:”min_text_length”;i:1;}
<strong>Magento 2:</strong>
{“max_text_length”:<span style=”color: #008000;”>25</span>,”min_text_length”:1}
<strong>Customer Registration Page</strong>
<img class=”img-responsive” src=”https://www.eternalsoftsolutions.com/blog/wp-content/uploads/2019/04/Customer-Register-1.png” />
<strong>Checkout Page Customer Registration</strong>
<img class=”img-responsive” src=”https://www.eternalsoftsolutions.com/blog/wp-content/uploads/2019/04/Checkout-Page-Register-1.png” />
<style type=”text/css”>
ul.listing li {<br /> list-style-type: disc !important;<br /> }<br /> ul.listing-new li {<br /> list-style-type: disc !important;<br /> }<br /> .blog-portion-one ul li.list-none {<br /> list-style-type: none !important;<br /> list-style: none !important;<br /> }<br /></style>

Nirav Shah is the Director of Eternal Web Pvt Ltd, an AWS Advanced Consulting Partner and certified Odoo Partner based in the UK. With over a decade of experience in cloud computing, digital transformation, and ERP implementation, Nirav helps enterprises adopt the right technology to solve complex business challenges. He specialises in AWS infrastructure, Odoo ERP, and web development solutions for businesses across the UK and beyond.
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.