I have gotten my validation module to kind of work, I have this:
function product_id_form_validate($form, &$form_state) {
if($form_state['node']->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