You are here

function _textimage_number_validate in Textimage 6.2

Same name and namespace in other branches
  1. 5.2 textimage_admin.inc \_textimage_number_validate()
  2. 5 textimage.module \_textimage_number_validate()
  3. 7.2 textimage.admin.inc \_textimage_number_validate()

File

./textimage_admin.inc, line 840

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'],
    )));
  }
}