Commit 540bf611 authored by fago's avatar fago

added validation callback to the property info generated for entity ids.

parent ca336d52
......@@ -74,6 +74,8 @@ class EntityDefaultMetadataController {
// Set better metadata for known entity keys.
$id_key = $this->info['entity keys']['id'];
$info['properties'][$id_key]['validation callback'] = 'entity_metadata_validate_integer_positive';
if (!empty($this->info['entity keys']['name']) && $key = $this->info['entity keys']['name']) {
$info['properties'][$key]['type'] = 'token';
$info['properties'][$key]['label'] = t('Machine-readable name');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment