Form alter not working I used custom module to alter comment form.in that module i write below code to remove required option for fivestar rating field. but it is not working.

$form['field_rating_comment']['und']['0']['value']['#required'] = FALSE;
$form['field_rating_comment']['#required'] = FALSE;


both are not working.
If it's an entity then you can remove the required property from manage fields option in comment.

$form['field_rating_comment']['und']['0']['rating']['#required'] = FALSE;