You are here

function leaflet_icon_validate in Leaflet 7

Validation callback for icon urls.

1 string reference to 'leaflet_icon_validate'
leaflet_form_elements in ./leaflet.formatters.inc
Helper function to standardize forms between views and field formatters.

File

./leaflet.formatters.inc, line 121
Leaflet field formatter functions.

Code

function leaflet_icon_validate($element, &$form_state, $form) {
  if (!empty($element['#value']) && !valid_url($element['#value'])) {
    form_error($element, t('Icon URL is invalid'));
  }
}