Error when trying to edit and save a user field When trying to update the settings of an integer field in the user fields, there is an error on saving and the logs show the following error:


  PHP Fatal error:  Call to undefined function element_validate_number() in /var/www/vhosts/**/includes/form.inc on line 1361
element_validate_number() was added in Drupal 7.6 (or 7.8, I can't quite remember) so it may be that you have an older version of core that doesn't contain that function.

If you can't upgrade your version of core, try adding this into a module file, it should save you the headache:

if (!function_exists('element_validate_number')) {
  function element_validate_number($element, &amp;$form_state) {
    $value = $element['#value'];
    if ($value != '' &amp;&amp; !is_numeric($value)) {
      form_error($element, t('%name must be a number.', array('%name' =&gt; $element['#title'])));
    }
  }
}


In case you're interested element_validate_number() is the replacement for the deprecated _element_validate_number().