You are here

function mvf_entityreference_field_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_settings_validate'
mvf_field_settings_form in ./mvf.module
Implements hook_field_settings_form().

File

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

Code

function mvf_entityreference_field_settings_validate($form, &$form_state) {

  // Entityreference module holds here field array definition. Since in our
  // case it's just a sub field, we have to pass it through mocking up
  // sub field function.
  $form_state['entityreference']['field'] = mvf_field_mockup($form_state['entityreference']['field'], 'unit');
  unset($form_state['values']['field']['settings']['unit']['handler_submit']);
}