The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Implement the following HTML form that contains the user information once they are ready to check out:
Modify the following
tag on checkout.html as shown below:
Validation Rules
The suggested parameter names (enclosed in parenthesis) as specified in checkout.html are given below
followed by the rules for each field:
1. First Name (name_first)
This field is required. The first name can only contain alphas (uppercase or lowercase), or a space (ascii A????1 32.
The web browser should display the appropriate error message if this field contains anything besides these
characters, (or left blank)
2. Last Name (name_last)
This field is required. The last name can only contain alphas (uppercase or lowercase), a space (ascii A????1 32), or
tick mark (A????1).The web browser should display the appropriate error message if this field contains anything
besides these characters, (or left blank)
3. Email (email)
This field is required. The email field must contain any number of characters followed by the A????1at signA????1 - @ .
Any number of characters can then follow the A????1@A????1 symbol. The web browser should display the appropriate
error message if this field contains anything besides these characters, (or left blank)
4. Address1 (address1)
This field is required. Any data in this field is acceptable. The web browser should display the appropriate error
message if this field is left blank.
5. Address2 (address2)
This field is optional. Can be left blank. Any data in this field is acceptable or it can be left blank.
6. City (city)
This field is required. The city can only contain alphas (uppercase or lowercase), or a space (ascii A????1 32). The
web browser should display the appropriate error message if this field contains anything besides these
characters, (or left blank).
7. State (state)
This field is required. The state field must consist of 2 capital alpha letters. The web browser should display the
appropriate error message if this field contains anything besides these characters, (or left blank).
8. Zip (zip)
This field is required. The zip code must consist of exactly 5 digits. The web browser should display the
appropriate error message if this field contains anything besides these characters, (or left blank).
9. Phone (phone)
This field is required. Examples of valid phones are shown below:
5555555555
(555)555-5555
555-555-5555
The ()A????1s and dashes are optional, no whitespace, 10 digits are required. . The web browser should display the
appropriate error message if this field contains anything besides these characters, (or left blank).
11. Fax (fax)
This field is not required. Use the same rule described above for the phone field if it does contain data. The
web browser should display the appropriate error message if this field contains anything besides these
characters.
12. Credit Cart Type (radio)
This field is required. Only one credit card type can be selected. The web browser should display the
appropriate error message if this field is left blank - no radio button selected. Credit Card Number (cc_no)
This field is required. Each credit card should consist of exactly 16 digits. The web browser should display the
appropriate error message if this field contains anything besides these characters or is left blank.
Note: A more sophisticated algorithm will be implemented in a later assignment that will more correctly
validate the credit card number. For this assignement, any 16 digit number will be acceptable.
13.Expiration Year A????1 Years should be between 2016 and 2020.
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------