Amazon Interview Question

How would you perform front-end form validation using jQuery?