Jump to content

[SOLVED] How to remove Integer validation for customer addresses in first_name and last name


Recommended Posts

I Want to remove integer validation for customer addresses in fields first name and last name...

I found this one In

Controllers->admin->adminaddressescontroller.php

 

$temp_fields[] = array(
'type' => 'text',
'label' => $this->l('First Name'),
'name' => 'firstname',
'required' => true,
'col' => '4',
'hint' => $this->l('Invalid characters:').' 0-9!<>,;?=+()@#"�{}_$%:',
'default_value' => $default_value,
);

Change this line....

 
'hint' => $this->l('Invalid characters:').' !<>,;?=+()@#"�{}_$%:',

but did'nt work......


Thanks in advance......
Edited by arslantabassum (see edit history)
Link to comment
Share on other sites

you have to change object definition in customer class

 

classes/Customer.php

'firstname' => 					array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32),

change 'validate' to isAnything

  • Like 2
Link to comment
Share on other sites

you have to change object definition in customer class

 

classes/Customer.php

'firstname' => 					array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32),

change 'validate' to isAnything

Thanks Vekia , It works great for me....

 

i have changed object definition in Address class similar to customer.

 

classes/Address.php

'firstname' =>                     array('type' => self::TYPE_STRING, 'validate' => 'isAnything', 'required' => true, 'size' => 32),

 

Now integer validation is No More...... :)

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...