function _field_hidden_element_validate_number in Field Hidden 7
Validator copied from core form.inc.
Somehow the original function isn't accessible here.
Parameters
array $element:
array &$form_state:
Return value
void
1 string reference to '_field_hidden_element_validate_number'
- field_hidden_field_instance_settings_form in ./
field_hidden.module - For editing a particular instance of the field (e.g. 'some_hidden' in current content type).
File
- ./
field_hidden.module, line 331 - Drupal Field Hidden module
Code
function _field_hidden_element_validate_number($element, &$form_state) {
$value = $element['#value'];
if ($value != '' && !is_numeric($value)) {
form_error($element, t('%name must be a number.', array(
'%name' => $element['#title'],
)));
}
}