javascript form validation

I need a program to validate and upload data from a form in js

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now