When looking at the cart, validation throws the error 'You have entered an invalid amount' upon clicking the cart or remove buttons.

CommentFileSizeAuthor
cart-error.png9.54 KBcarlhinton

Comments

carlhinton’s picture

Assigned: carlhinton » Unassigned
Status: Active » Needs review

The offending line of code is from line 234

if (!is_numeric($donate_amount) || $donate_amount <= 0){
form_set_error('items]['. $key .'][donate_amount', t('You have entered an invalid amount.'));
}

The line of code does not seem to be needed as removing it causes no errors in the checkout, in the prepayment or in payment.

Validation that the donation amount is numeric and greater than zero should occur when the user adds the donation.