You are here

function _mobile_switch_redirect_to_mobile_landing_validate in Mobile Switch 7.2

Render API callback: Validates the mobile landing path.

1 string reference to '_mobile_switch_redirect_to_mobile_landing_validate'
mobile_switch_advanced_settings_form in includes/mobile_switch.admin.inc
Form constructor for the Advanced settings form.

File

includes/mobile_switch.admin.inc, line 396
Administrative page callbacks for the Mobile Switch module.

Code

function _mobile_switch_redirect_to_mobile_landing_validate($element, &$form_state) {
  if (!empty($element['#value'])) {
    if (!drupal_valid_path($element['#value'])) {
      form_error($element, t('%title: The field must contain a valid path.', array(
        '%title' => t($element['#title']),
      )));
    }
  }
}