function _element_validate_number in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6.2 includes/content.admin.inc \_element_validate_number()
Helper form element validator : number.
1 string reference to '_element_validate_number'
- number_field_settings in modules/
number/ number.module - Implementation of hook_field_settings().
File
- includes/
content.admin.inc, line 1954 - Administrative interface for content type creation.
Code
function _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'],
)));
}
}