function _linkimagefield_widget_form_validate in Link Image Field 5
1 call to _linkimagefield_widget_form_validate()
- linkimagefield_widget in ./
linkimagefield.module - Implementation of hook_widget().
File
- ./
linkimagefield.module, line 565 - Defines an link image field type. linkimagefield uses content.module to store the fid, and the drupal files table to store the actual file data.
Code
function _linkimagefield_widget_form_validate($node, $field, $node_field) {
$fieldname = $field['field_name'];
if ($field['required']) {
if (!count($node_field)) {
form_set_error($fieldname, $field['widget']['label'] . ' is required.');
}
}
}