function pay_method::pay_method_validate in Pay 6
Same name and namespace in other branches
- 7 includes/handlers/pay_method.inc \pay_method::pay_method_validate()
1 call to pay_method::pay_method_validate()
- pay_method_gateway::pay_method_validate in includes/
handlers/ pay_method_gateway.inc
1 method overrides pay_method::pay_method_validate()
- pay_method_gateway::pay_method_validate in includes/
handlers/ pay_method_gateway.inc
File
- includes/
handlers/ pay_method.inc, line 158 - The base class for payment activities. All payment method classes should extend this class.
Class
- pay_method
- @file The base class for payment activities. All payment method classes should extend this class.
Code
function pay_method_validate($form, &$form_state, $element) {
// Confirm that the amount falls within our min/max settings.
if ($this->total < $this->min_amount || $this->total > $this->max_amount) {
$error = t('The %method payment method requires an amount between %min and %max', array(
'%method' => $this
->title(),
'%min' => $this->min_amount,
'%max' => $this->max_amount,
));
form_error($element['total'], $error);
}
}