Drupal 7 form alter required field is not working when i used field from "Add existing field" I have added two fields in to my custom content type using "Add existing field".

For specific URL, I need to set these two fields as Required.

So I have altered my form and set required condition. After setting it, I have printed the form using devel, these fields are having required settings.

$form['field_name']['und']['#required'] = TRUE;
$form['field_email']['und']['#required'] = 1;
dsm($form);


But required condition is not applied. 




That is, I could not see red color required indication as well as its not working in the form submit.
Try    

$form['field_email']['und']['0']['value']['#required'] = TRUE;


and if not work then try 

$form['field_email']['und']['0']['#required'] = TRUE;