Validation on textfield I have gotten my validation module to kind of work, I have this:

function product_id_form_validate($form, &amp;$form_state) {

if($form_state['node']-&gt;field_product_id['und']['0']['value'] == '123'){
    form_set_error('field_product_id', 'Product ID: is taken');
}


}

But when I change the value in field_product_id the value doesn't change upon save, it stays the same as when I first entered the form. Is there a function I need to call to say, when I click save look at this field again?

Thanks
Submitted values are stored in the $form_state['values'] array so you need to test that instead:

if ($form_state['values']['field_product_id'][LANGUAGE_NONE][0]['value'] == '123') {
  ...
}