Commit 83bd1e56 authored by Stephanie Kirtiadi's avatar Stephanie Kirtiadi
Browse files

Validate the credit card if payment is cc on donate page.

Check the stripe errors only if the payment method is credit
card on submit.

Issue #47847
parent fa167aa5
......@@ -232,8 +232,10 @@ export function _GivingForm(props) {
newErrors.push(new NamedError(fieldName, fieldName + ' must be filled out'));
}
}
for (const stripeField in stripeErrors) {
newErrors.push(stripeErrors[stripeField]);
if (paymentMethod == 'credit-card') {
for (const stripeField in stripeErrors) {
newErrors.push(stripeErrors[stripeField]);
}
}
return newErrors;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment