270: VALIDATION

Form Validation

1. Come to class as there may be corrections, changes and additions.   Significant late penalty per day.
2. Follow these directions to SUBMIT a folder called "FORM" to the D2L dropbox., NOT on cisprod.
3. Comment! (guidelines)

form form form form


Create a form with inputs & selections as follows:

   First Name:  Betty [Letters only, first letter capitalized.]
   Last Name:   Betters [Letters only, first letter capitalized.]
         Challenge: If first letter of name not capitalized, CAPITALIZE the first letter! (onblur, charAt, substr)

   Telephone: 123-456-7890  [length 12, digits and hyphen separator only]
   
   Zip: 12345       [length 10, digits only]
        12345-7890  [length 10, digits and hyphen separator only]  ? How do you reject 12345-22 ?

   E-Mail: type="email"   
        
   SS#: 123-45-6789    [length 11, digits and hyphen separator only]

   Income: 0-999999   [check for number, range ]

   <input type=" "    ==>> text, password, email, tel, checkbox, radio, submit
       id=" "  
       name=" " 
       size=" "  maxlength=" " 
       title=" " 
       placeholder=" what the user sees"  
       pattern=" "     ==>>  regex quick start   regex overview   pattern reference!
       tabindex=" "  
       required
    /> 
    
   
         


EXAMPLES:

Income: $500.00 Tax: $ 50.00 Net Income: $450.00 ------------------------------------------ Income: $10,000.00 Tax: $ 1,000.00 (10% of 10,000) Net Income: $ 9,000.00 --------------------------------------------- Income: $20,000.00 Tax: $ 2,000.00 (10% of 20,000) Net Income: $18,000.00 ------------------------------------------- Income: $30,000.00 Tax: $ 4,000.00 (10% of 20,000 plus 20% of 10,000) Net Income: $26,000.00 --------------------------------------------- Income: $40,000.00 Tax: $ 6,000.00 (10% of 20,000 plus 20% of 20,000) Net Income: $34,000.00 --------------------------------------------- Income: $50,000.00 Tax: $ 8,000.00 (10% of 20,000 plus 20% of 30,000) Net Income: $42,000.00 --------------------------------------------- Income: $60,000.00 Tax: $10,500.00 (10% of 20,000 plus 20% of 30,000 plus 25% of 10,000) Net Income: $49,500.00