Embedding a custom form in node.tpl.php does not trigger validation
$form_state['values']['sample_field'] this value is set after submit, so you validate the old result instead of your actual form.

maybe this workflow helps you