Question: As a programmer for JScript, Inc., you have been assigned to a team to develop a Web site for IT support requests. The Web designer
As a programmer for JScript, Inc., you have been assigned to a team to develop a Web site for IT support requests. The Web designer you are working with is good at the visual aspects of the Web forms, but lacks the knowledge to implement the JavaScript code for form validation. There is a new ticket submission form that needs validation. The data on the form and field names are shown below.
Ticket Input Form Data
ReqDate request date, required, must be mmddyyyy format
EmpID employee ID required, must be alphanumeric characters, starting with a capital letter, followed by numbers
FName user first name, required, must start with capital letter
LName user last name, required, must start with capital letter
ProbDesc problem description, required
Your task is to write the JavaScript code for appropriate input validation for this form. The validation code for the form will be in a function called validateInputFormform where the form parameter is an object with access to each form field by the names given in the list for each form. The function will return true if the form input is valid, or false if the form input is invalid. The function will be responsible for issuing appropriate alert messages for any invalid input, and should return after finding the first invalid input and notifying the user. The validation function should use if statements and regular expressions where appropriate to validate the input.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
