The first name cannot be empty., The last name cannot be empty., Invalid email addres
Hello there,
In checkout process when I select either "Checkout as a guest" and then fill out the proper form, clicking on the button to go to the next step generates error. This is what the exception is caught:
{"error":-1,"message":"The first name cannot be empty., The last name cannot be empty., Invalid email address \"\"."}
Can anyone please give me some solution for this issue? Why Magento is giving this error when all the fields are properly filled up?
thank you for reply.
I tried to disable all extension except core, like everything with prefix Mage_ (Mage_Core, etc). So I think, that this could not do any installed extension drom my side.
In var/log, there is no file displaying this error.
do you install magento in your local computer or on web hosting? If you install on your local computer then many reasons can come from domain name so that let create a domain for it on your computer like myshop.com
I find and hash this (normally is without comment stars):
/**
* $errors = array();
* if (!Zend_Validate::is( trim($this->getFirstname()) , 'NotEmpty')) {
* $errors[] = Mage::helper('customer')->__('The first name cannot be empty.');
* }
*
* if (!Zend_Validate::is( trim($this->getLastname()) , 'NotEmpty')) {
* $errors[] = Mage::helper('customer')->__('The last name cannot be empty.');
* }
*
* if (!Zend_Validate::is($this->getEmail(), 'EmailAddress')) {
* $errors[] = Mage::helper('customer')->__('Invalid email address "%s".', $this->getEmail());
* }
*
*/
After I comment this validation, then Checkout page is working fine. No pop-up sceen is displaying.
And Requirements fields working too, like first name, last name, etc.
So this is resuliton for me.
Hello, I have exactly the same error, I hope someone can help me to find why the validation for these fields is not working!
The "solution" stevecz commented before, means the fields will not be validated, is that a proper solution?
Solution provided by stevecz is not very good. There is no errors messages anymore -that is good, but there is no errors messages even if the errors are really there - it is bad.
Such kind of problems usually appear with installation of some new extensions, themes or when some default magento files were edited. If it is possible you should load all magento files in a folder with magento, flush your cache and check if the problem remains.
Bookmarks