You are here

function drupalgap_sdk_form_validate in DrupalGap 7

Same name and namespace in other branches
  1. 7.2 drupalgap.module \drupalgap_sdk_form_validate()

File

./drupalgap.module, line 428
A module to provide a bridge between Drupal websites and PhoneGap mobile applications.

Code

function drupalgap_sdk_form_validate($form, &$form_state) {
  $dir = $form_state['values']['dir'];
  if (file_exists($dir)) {
    form_set_error('dir', t('That directory already exists!'));
  }
  else {
    if ($dir == 'drupalgap') {
      form_set_error('dir', t('The name "drupalgap" is reserved, choose a different name.'));
    }
  }
}