WDV221 Intro Javascript
In Class Lab - Form Validation
Instructions: Modify this page so that the form works as described.
- The Customer Name is required.
- The Item Price field should do the following
- should be a number
- should allow decimal values
- cannot be less that zero
- display and highlight the error messages on the page
- The Number Purchased field should do the following:
- be a number
- should only allow whole numbers/integers
- cannot be zero or less
- display and highlight the error messages on the page
- The Reset button should clear the form fields, Sale Price area, Total Sales area, all error messages.
- The Clear Order button should do the same as the Reset button.
- The Submit order button should validate the fields and if all fields are valid display "Valid Form" in the Sales Price area and Total Sales area.