Jump to content

Customer with 0 in their last name can't register


Recommended Posts

Who has a number in their last name?

You would have to edit or override the customer class, and change the name validation from plain text to text + chars.

Current (Customer.php class)


 protected  $fieldsValidate = array('secure_key' => 'isMd5', 'lastname' => 'isName', 'firstname' => 'isName', 'email' => 'isEmail', 'passwd' => 'isPasswd',

Change to

 


 protected  $fieldsValidate = array('secure_key' => 'isMd5', 'lastname' => 'isCleanHtml', 'firstname' => 'isName', 'email' => 'isEmail', 'passwd' => 'isPasswd',

 

 

I have not tested this, there may be other places where you need to make a similar change.

 

Edit:

I just noticed that it is a protected variable, I'm not sure you can override it, you may have to edit the actual class file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...