function _textimage_number_validate in Textimage 7.2
Same name and namespace in other branches
- 5.2 textimage_admin.inc \_textimage_number_validate()
- 5 textimage.module \_textimage_number_validate()
- 6.2 textimage_admin.inc \_textimage_number_validate()
Auxiliar function to validate either the entered value is a valid hex color code or not.
1 string reference to '_textimage_number_validate'
- textimage_preset_edit in ./
textimage.admin.inc - Todo.
File
- ./
textimage.admin.inc, line 839 - Textimage admin page callback
Code
function _textimage_number_validate($field, $field_name) {
if (!empty($field['#value']) && !is_numeric($field['#value'])) {
form_set_error($field_name, t('The value for %field must be a number.', array(
'%field' => $field['#title'],
)));
}
}