ShizukaDonaghue / luve

LUVE is a full-stack web application built with Django. It's an online store for safe sunblock.
https://luve.herokuapp.com/
0 stars 1 forks source link

BUG: Checkout Form Accepts Invalid Fields #92

Closed ShizukaDonaghue closed 1 year ago

ShizukaDonaghue commented 1 year ago

Checkout form is submitted for Stripe payments even when the form is invalid. It allows whitespace in fields other than the card details field and creates 500 error when it submits for payment.

ShizukaDonaghue commented 1 year ago

In order to prevent the form from being submitted for payments before the form is completed correctly, removed the jQuery validation which called the checkout function as it did alert the user that the details were incomplete but still allowed the form to be submitted for payment. Instead, regular expressions were added to the form to prevent invalid forms from being submitted for payment.