You are here

function wsclient_ui_element_url_validate in Web service client 7

FAPI callback to validate a URL.

1 string reference to 'wsclient_ui_element_url_validate'
wsclient_service_form in wsclient_ui/wsclient_ui.inc
Provides a form to add, edit and clone web service descriptions.

File

wsclient_ui/wsclient_ui.inc, line 542
WSClient UI - implements service description management and configuration screens.

Code

function wsclient_ui_element_url_validate($element, &$form_state) {
  if (!valid_url($element['#value'], TRUE)) {
    form_error($element, t('Please enter a valid URL.'));
  }
}