function mee_field_text_validate in Scald: Media Management made easy 7
Validate callback for mee_field_widget_form.
1 string reference to 'mee_field_text_validate'
- mee_field_widget_form_alter in modules/
fields/ mee/ mee.module - Implements hook_field_widget_form_alter().
File
- modules/
fields/ mee/ mee.module, line 546 - Defines a special textarea, with drag and drop media driven by Scald and dnd.module.
Code
function mee_field_text_validate($element, &$form_state) {
foreach ($form_state['field'] as $field_name => $values) {
foreach ($values as $langcode => $data) {
if (isset($form_state['values'][$field_name][$langcode]) && is_array($form_state['values'][$field_name][$langcode]) && isset($form_state['values'][$field_name][$langcode][0]['mee']) && isset($form_state['input'][$field_name][$langcode][0]['mee'])) {
$form_state['values'][$field_name][$langcode][0]['mee'] = $form_state['input'][$field_name][$langcode][0]['mee'];
}
}
}
}