function currency_form_validate in Currency 6
Same name and namespace in other branches
- 5 currency.module \currency_form_validate()
- 7 currency.module \currency_form_validate()
Validate handler for the currency exchange form.
File
- ./
currency.module, line 143 - This module provides currency exchange rates.
Code
function currency_form_validate($form, &$form_state) {
if (!$form_state['values']['currency_amount']) {
form_set_error('currency_amount', t('Amount is required.'));
}
if (!is_numeric($form_state['values']['currency_amount'])) {
form_set_error('currency_amount', t('Invalid Amount. Please enter a valid numeric amount.'));
}
}