My Registration form shows "Phone Number" is a required value, even after entering telephone correctly.
I have placed the following code in register form
<?=$this->setShowAddressFields(true);?>
and removed the "required entry" from class name of the textbox. Also set the is_required value to 0 in eav_attribute table. Then commented the following in abstract.php file
if (!Zend_Validate::is($this->getTelephone(), 'NotEmpty')) {
$this->addError(Mage::helper('customer')->__('Please enter the telephone number.'));
}
**
How can I save the customer details successfully???
Best Answer
Ive seen this problem before, it turned out that the block for the address was being included in the html twice. Therefore you end up with two identical input forms, one with the content, and a second one not visible, which has no value - this is the field which is actually failing the validation but the javascript is triggering the warning on the first (visible) one.
If you view the source code, and look for the field name, if you see a second one then you have the same problem. You likely have a layout modification which is putting in the block for a second time somewhere.