Page 1 of 1

Able to enter text into Quantity / Form Validation

Posted: Sat Apr 14, 2018 4:19 am
by jennarif
OpenCart Version 3.0.2.0

I've been playing around with the new version of OpenCart in hopes of finding a replacement for our current store software. Much to my dismay, one of the simplest things for forms is missing! Validation. E.G. I am able to enter text into the quantity box (see Screen Shot 2018-04-13 at 1.15.05 PM.png) and press add to cart with no reported error. In fact, I even get a message saying the product was added to the cart. The shopping cart itself though (see Screen Shot 2018-04-13 at 1.15.20 PM.png) is, in fact, empty. Form validation would be a very nice addition!

Re: Able to enter text into Quantity / Form Validation

Posted: Sun Apr 15, 2018 1:46 am
by cyclops12
That is because it is named as Text input instead of Number
I have made a vqmod to change this.
Try it and see if it works for you as well.

P.S This should be addressed for future versions !!

Re: Able to enter text into Quantity / Form Validation

Posted: Sun Apr 15, 2018 7:23 pm
by cyclops12
Actually just checked this properly and found it needs to be text otherwise you may be able to input minus figures.
So this updated vqmod should work better as the keypress is validated

Re: Able to enter text into Quantity / Form Validation

Posted: Fri Apr 20, 2018 6:43 am
by jennarif
Thanks!