You are here

function currency_form_validate in Currency 5

Same name and namespace in other branches
  1. 6 currency.module \currency_form_validate()
  2. 7 currency.module \currency_form_validate()

File

./currency.module, line 111

Code

function currency_form_validate($form_id, $form_values) {
  if (!$form_values['currency_amount']) {
    form_set_error('', t('Amount is required.'));
  }
  if (!is_numeric($form_values['currency_amount'])) {
    form_set_error('', t('Invalid Amount. Please enter a valid numeric amount.'));
  }
}