You are here

function _datex_machine_name_exists in Datex 7.3

Datex form element validation for schema name.

1 string reference to '_datex_machine_name_exists'
datex_admin_form in ./datex.admin.inc
Provides administration form for datex module (menu callback).

File

./datex.admin.inc, line 171
Datex administration forms.

Code

function _datex_machine_name_exists($value, $element, $form_state) {
  $machine = $form_state['values']['datex_new_schema_machine_name'];
  return $machine === 'default' || $machine === 'disabled' || in_array($machine, array_keys(variable_get('datex_schema', [])));
}