You are here

function cmis_field_field_validate in CMIS API 7

Same name and namespace in other branches
  1. 7.2 cmis_field/cmis_field.module \cmis_field_field_validate()

Implements hook_field_validate().

For now, just validates that the field isn't empty.

File

cmis_field/cmis_field.module, line 25

Code

function cmis_field_field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors) {
  foreach ($items as $delta => $item) {
    if (!empty($item['cmis_field_path'])) {
      if (1 == 0) {
        $errors[$field['cmis_field']][$langcode][$delta][] = array(
          'error' => 'cmis_field_invalid',
          'message' => t('You are in the anti-universe, where 1 == 0.'),
        );
      }
    }
  }
}