You are here

function sms_sendtophone_form_validate in SMS Framework 6.2

Same name and namespace in other branches
  1. 5 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_validate()
  2. 6 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_validate()
  3. 7 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_form_validate()

File

modules/sms_sendtophone/sms_sendtophone.module, line 403

Code

function sms_sendtophone_form_validate($form, &$form_state) {
  if (!($form_state['values']['number'] = sms_formatter($form_state['values']['number']))) {
    form_set_error('number', t('Please enter a valid phone number.'));
  }
  if (empty($form_state['values']['gateway'])) {
    $form_state['values']['gateway'] = array();
  }
}