function linkit_isnumeric_validate in Linkit 7.3
Same name and namespace in other branches
- 7.2 plugins/export_ui/linkit_profiles.inc \linkit_isnumeric_validate()
Element validate callback for fields that should be numeric.
This function is assigned as an #element_validate callback in linkit_profiles_form().
1 string reference to 'linkit_isnumeric_validate'
- _linkit_build_autocomplete_form_fields in plugins/
export_ui/ linkit_profiles.inc - Append autocomplete (BAC) form element to the profile form.
File
- plugins/
export_ui/ linkit_profiles.inc, line 534
Code
function linkit_isnumeric_validate($element, &$form_state, $form) {
if (!empty($element['#value']) && !is_numeric($element['#value'])) {
form_error($element, $element['#title'] . ' should only contains numbers.');
}
}