Got Spam registration: Magento 2.x

You got the spam during registration???? even adding after google CAPTCHA??

Its a good practice to add the CAPTCHA in your magento store during login/signup but today era some smart bot system bypass this CAPTCHA code and send anonymous mail id, which might impact your site performance because many of the search engine (like google, bing, yahoo, etc) checks for the spam contents for site and accordingly define the website rank. So to get rid of from all these make a defined length( As i have put 50 ) for the text field, because most of the bot almost always enters email of length greater than 150, follow the below steps to change config:

Go with to the database table named customer_eav_attribute and edit the record 5 (attribute_id 5).

Edit content table column 
a:2:{s:15:”max_text_length”;i:255;s:15:”min_text_length”;i:1;}

To
a:2:{s:15:”max_text_length”;i:50;s:15:”min_text_length”;i:1;}

attribute_id 5 is the first name and the values in the validate_rules are checked before it update to the database.

Happy Learning 🙂

Related Post