function addtocalendar_field_validate in Add To Calendar Button (AddEvent.com) 7.2
Implements hook_field_validate().
File
- ./
addtocalendar.module, line 192 - Contains module code.
Code
function addtocalendar_field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors) {
foreach ($items as $key => $item) {
if (!empty($item['display_addtocalendar'])) {
// Make sure it is available.
if (empty($item['display_addtocalendar'])) {
$errors[$field['field_name']][$langcode][$key][] = array(
'error' => 'addtocalendar_check',
'message' => t('Some error in Add to calendar'),
);
}
}
}
}