The right way to validate fields Rather than creating a new field via the Field API, and as a quick workaround, I've added a simple text field to a content type that I'm now attempting to validate via hook_node_validate(). Unlike previous versions of Drupal, the value for this field is not simply available as $node-&gt;field_name or $form['field_name'], but instead as a nested array containing a variety of other information.

My question then is this: what is the 'correct' and therefore most future proof way to retrieve the value for this field? 

Am I supposed to be using the likes of field_view_value() or field_view_field(), or is it acceptable to simply reference $node-&gt;field_name['und'][0]['value'] for example.
field_get_items() is the one you're looking for.

$items = field_get_items('node', $node, 'field_FIELD_NAME');
$first_value = $items[0]['value'];


It also takes care of language selection for you, so no need to worry about that one any more.