You are here

function sms_carriers_edit_form_validate in SMS Framework 7

Form submission handler for sms_carriers_edit_form().

See also

sms_carriers_edit_form()

File

./sms.admin.inc, line 272
The admin sms functions.

Code

function sms_carriers_edit_form_validate(&$form, &$form_state) {
  $carriers = sms_carriers();
  if ($form_state['values']['domain'] != $form_state['values']['carrier']) {
    foreach ($carriers as $domain => $carrier) {
      if ($domain == $form_state['values']['domain']) {
        form_set_error('', t('Domain must be unique.'));
      }
    }
  }
}