function nodewords_extra_location_latitude_form_validate in Nodewords: D6 Meta Tags 6
Validate the value passed as latitude.
1 string reference to 'nodewords_extra_location_latitude_form_validate'
- nodewords_extra_location_form in nodewords_extra/
nodewords_extra.module - Set the form fields used to implement the options for the meta tag.
File
- nodewords_extra/
nodewords_extra.module, line 606 - Define extra meta tags for Drupal pages.
Code
function nodewords_extra_location_latitude_form_validate($element, &$form_state) {
if (!empty($element['#value']) && (!is_numeric($element['#value']) || $element['#value'] < -90.0 || $element['#value'] > 90.0)) {
form_error($element, t('Latitude must be a number between -90.0 and 90.0 (extrems included).'));
}
}