You are here

function sms_txtlocal_admin_form_validate in SMS Framework 6

Validates the submission of the configuration form.

_state

Parameters

$form:

File

modules/sms_txtlocal/sms_txtlocal.module, line 137
Txtlocal gateway module for Drupal SMS Framework. Outbound+Inbound

Code

function sms_txtlocal_admin_form_validate($form, &$form_state) {
  if (empty($form_state['values']['sms_txtlocal_user'])) {
    form_set_error('', t('You must specify a username.'));
  }
  if (empty($form_state['values']['sms_txtlocal_password'])) {
    form_set_error('', t('You must specify a password.'));
  }
  if (strlen($form_state['values']['sms_txtlocal_defaultsender']) < 3) {
    form_set_error('', t('The default sender must be at least 3 characters.'));
  }
}