You are here

function mvf_entityreference_field_instance_settings_validate in Measured Value Field 7

Supportive validation function.

In fact function does not validate anything, however, it hooks into the logic of entityreference module and makes it work as a subfield for MVF.

1 string reference to 'mvf_entityreference_field_instance_settings_validate'
mvf_field_instance_settings_form in ./mvf.module
Implements hook_field_instance_settings_form().

File

./mvf.module, line 600
Define a field type of measured value.

Code

function mvf_entityreference_field_instance_settings_validate($form, &$form_state) {

  // Entityreference module holds here instance array definition. Since in our
  // case it's just a sub field, we have to pass it through mocking up
  // sub field function.
  $field = $form['#mvf']['field'];
  $instance = $form_state['entityreference']['instance'];
  $form_state['entityreference']['instance'] = mvf_instance_mockup($field, $instance, 'unit');
}