| Versionen | |
|---|---|
| drupal7 | hook_field_widget_error($element, $error) |
Flag a field-level validation error.
$element An array containing the form element for the widget. The error needs to be flagged on the right sub-element, according to the widget's internal structure.
$error An associative array with the following key-value pairs, as returned by hook_field_validate():
modules/
<?php
function hook_field_widget_error($element, $error) {
form_error($element['value'], $error['message']);
}
?>
Kommentare
Kommentar hinzufügen