Limit Character Types In Profile Fields - I.e. First And Last Name

Getting a lot of spam in new customer profiles. People are entering urls in the first or last name. Get a loan, cryptocurrency, whatever crap. I'd like to restrict the data entry in the first and last name field to only A-Z characters. Any easy way to do this? Anyone have an add-in or want to write one for a reasonable amount of money?

Yes, you can create custom form validators based on input element class attribute. E.g.


Can you PM me a quote for an add on?

Be sure to handle hyphens and apostrophes otherwise you will eliminate valid names. Are these getting around ReCaptcha? If not, simply enable ReCaptcha for profile fields.

Can you PM me a quote for an add on?

Please post all requirements here

They are back at it today. The problem is a URL in the "name" field in the customer profile. That's what I need to block. Simplest might be to block special characters like : and // which would block the link.

Yes, we use recaptcha but they do it manually so they can just do it like any other person.

Probably easiest way is to do something like this in app/addons/my_changes/controllers/common/profiles.pre.php

if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
  $excluded_strings('http:', 'https:', 'ftp:', 'sftp:', 'ftps:');
  $exclude_fields('firstname', 'lastname');

foreach($exclude_fields as $field) {
if( !empty($_REQUEST[$field]) ) {
foreach($excluded_strings as $str) {
if( stripos($_REQUEST[$field], $str) !== false ) {
die(“Hacker go away!”);
}
}
}
}
}
return array(CONTROLLER_STATUS_OK);

my profiles.php is located in app/controllers/frontend not common so just change the location of there the profiles.pre.php file would go? Not the coding expert by any stretch

As alternative, use hooks in the fn_update_user function (app/functions/fn.users.php)

Can you provide a price for an add-on to do this? Ideally, I would like a text box in the add-on setting to enter what to block.... 'www', 'http', etc and a entry in language for what error message to display. By default it could be 'Please enter a valid first and last name'. Thanks.

Can you provide a price for an add-on to do this? Ideally, I would like a text box in the add-on setting to enter what to block.... 'www', 'http', etc and a entry in language for what error message to display. By default it could be 'Please enter a valid first and last name'. Thanks.

Yes, it can be done with the addon. We are overloaded now. So hire someone to perform it for you

Feel free to click the link in my signature and I'll be happy to give you a quote. We can either create a separate addon for you or extend your existing my_changes addon to do so.