field_default_validate

function field_default_validate

field_default_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors)

Generic field validation handler.

Possible error codes:

  • 'field_cardinality': The number of values exceeds the field cardinality.

Parameters

$entity_type: The type of $entity.

$entity: The entity for the operation.

$field: The field structure for the operation.

$instance: The instance structure for $field on $entity's bundle.

$langcode: The language associated to $items.

$items: $entity->{$field['field_name']}[$langcode], or an empty array if unset.

$errors: The array of errors, keyed by field name and by value delta, that have already been reported for the entity. The funct