I have written a regular expression for the quantity and the maximum they can order is 500 for each (summer, autumn, winter). The expression is -
var chkquantity = ^([1-9]?\d|[1-4]\d{2}|500)$/
I'm not sure if the test is correct -
if ((chkquantity.test(quantity)== false){
alertmsg = alertmsg + "Please limit each magazine to 500 copies or less:" + "\n";
}
?
/^([1-9]|[1-9][0-9]|[1-4][0-9][0-9]|500)$/.