function radioactivity_field_validate in Radioactivity 7
Same name and namespace in other branches
- 7.2 radioactivity.field.inc \radioactivity_field_validate()
Implement hook_field_validate().
File
- ./
radioactivity.field.inc, line 226
Code
function radioactivity_field_validate($obj_type, $object, $field, $instance, $langcode, &$items, &$errors) {
foreach ($items as $delta => $item) {
if (isset($item[RADIOACTIVITY_FIELD_ENERGY]) < 0) {
$errors[$field['field_name']][$langcode][$delta][] = array(
'error' => 'radioactivity_invalid',
'message' => t('Value must be greater than 0'),
);
}
}
}