form textfield name -value changed and does not validate any more i have a checkout-page (drupal commerce) form with an address section generated by the module addressfield.
currently all text-inputfields have this markup-structure:

&lt;input class="last-name" id="edit-last-name" name="customer_profile_billing[commerce_customer_address][und][0][last_name]"&gt;

class + id + name

in this config they validate.

if i change the value of the name attribute the form doesnt validate anymore, the form says: 


  field XY is required


the form-validator obviously doesnt recognise my inputs.

question: how can i get the validation process to work with a modified name attribute?
It all happens in drupal_validate_form(). 


  Validates user-submitted form data in the $form_state array.


If I could offer some advice - have a re-think. Changing the name attribute of form elements, especially on those that are part of field widget forms, is a good way to get unexpected results. The name on an input is completely irrelevant to the page, so changing it doesn't actually get you anything. If you're trying to change it so you can target the elements using JS, for example, I'd advise changing your JS code rather than the form markup. Trust me when I say it will be easier.

The only valid situation I know of to override the name of an element is when you need to provide multiple submit buttons on a single form that carry out the same action, but in a different context.