The best way to do this in MVC 2 is to take advantage of the inbuilt validation by using data annotations.
For the Quantity field you should use the Range annotation.
Here is a great post to walk you through it, and if you follow it to the end he covers using jquery to do the client side validation too.
JonVD
2010-10-30 13:29:27